html - Unwanted margin removal -


why there orange , yellow lines? think orange children element must cover yellow parent element , blue children element must cover orange parent element.

look @ code in jsfiddle. code below not full.

html:

<section id="middle_col">     <article id="article_1">     </article>  </section> 

css:

 body { width: 1024px; background-color: grey; } 

to solve issue want utilize css reset, able replicate , solve issue using popular erik meyer's css reset below

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed,  figure, figcaption, footer, header, hgroup,  menu, nav, output, ruby, section, summary, time, mark, audio, video {     margin: 0;     padding: 0;     border: 0;     font-size: 100%;     font: inherit;     vertical-align: baseline; } /* html5 display-role reset older browsers */ article, aside, details, figcaption, figure,  footer, header, hgroup, menu, nav, section {     display: block; } body {     line-height: 1; } ol, ul {     list-style: none; } blockquote, q {     quotes: none; } blockquote:before, blockquote:after, q:before, q:after {     content: '';     content: none; } table {     border-collapse: collapse;     border-spacing: 0; }  

the conflict has of new html5 elements behaving badly when interact containing elements' margin inconsistencies. here erik ensures of html 5 elements have display:block; , standardizes padding , margins.

you can read more work here


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -