Sunday 15 March 2015

html - CSS - Internet Explorer and the tag background -



html - CSS - Internet Explorer and the <main> tag background -

i have pretty simple layout renders fine in both firefox , chrome, net explorer (version 11) seems unable render kind of background color <main> element.

i have <main> element kid of <body> element , neither background or background-color seem create difference. <main> have same background <body>. haven't found says whether or not bug in ie.

check out this jsfiddle using net explorer see mean.

obviously, replace <main> <div id="main"> , update css selectors want understand why happening.

ie11 not back upwards <main> element natively. can introduce back upwards either using script modernizr, or single harmless line of js:

document.createelement('main');

the element not inserted in dom, recognized proper element ie. after this, still not have proper styling. add together next css:

main { display:block; }

and fine. reason see not getting content because ie not add together box model without these 2 steps, , such gets no 'layout' or 'size'. it's invisible, that's why see body. does contain elements, rendered (sort of) correctly based on top left coordinate of <main> element.

html css html5 internet-explorer

No comments:

Post a Comment