Padding doesn't work when using <section> tag in IE
Many older browsers do not understand HTML5 tags, such as section , and use the reserve of processing them as inline elements in a document stream.
IE goes beyond that and completely ignores HTML5 tags. To fix this, you need to add tags to the document through Javascript. Fortunately, there is very good HTML5Shiv that you can embed in your html header, for example:
<!DOCTYPE html> <head> <!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> Any IE smaller than IE9 will now use this script to include common HTML5 blocks.
You still need to use CSS to render tags as blocks. I use:
article,aside,details,figcaption,figure, footer,header,hgroup,menu,nav,section { display:block; } As others noted, the <section> element is one of the new HTML5 elements that is not supported in versions of IE below 9.
I'm not sure how accurate this article is , but they can pull the effect after using XHTML5. However, there are many caveats that must be taken very carefully into account in order to make it work (for example, not submitting an XML declaration in IE, as this will force IE to switch to quirks, but you need to give it to another browser, etc. .)
However, the advantages of this approach are that you do not need Javascript to make it work, and therefore can serve users with Javascript disabled.