All Star Attributes for HTML5 elements in IE

Search for a command to run...

No comments yet. Be the first to comment.
Check if a CSS feature is ready in a browser or not and apply code for both scenarios

The :has selector can be used to make a 100% iframe's container to be also 100%

Catch the first element type that's a child of a parent element
Use HTML5 properties and advanced CSS attributes for validation

Demo : http://s3.css.co.in/demo/mega-menu.html Code : https://gist.github.com/anjanesh/876b781b69fff9598fd73ffeda4b9318 Sorry for no explanation here. #top-menu-1 > div > a + div:hover has to be displayed as block too. For people who know CSS, I thin...

CSS
13 posts
Styles of the Web
It is very common to set margin:0 and padding:0 as default to all HTML elements via the star hack.
* { margin:0; padding:0; }
And we get so used to explicitly setting margins and paddings to elements that require them, that we assume no padding & margins at all as default for all elements.
With html5shiv javascript, we can get most HTML5 functionality working in Internet Explorer (6,7,8). And with ie7-js, we can get IE (6,7,8) to behave more-or-less like IE9.
When using HTML5 elements such as header, section, footer, aside, nav, article & figure, the all star hack doesn’t work and hence we need to set them explicitly. (Looks like ie7-js is resetting the margins)
IE6 / IE7 :
IE8 :
margin:0 isn’t applied in IE 6/7/8. So don’t forget to set it explicitly for HTML5 elements.
header, section, footer, aside, nav, article, figure { display:block; margin:0; padding:0; }