html - css root element margin -


in css html element said root element,
, i'm reading in this article width , height governed browser window/frame.

so, make sense apply margins ?

i think doesn't because if root element it's not supposed contained in higher level element.

howewer every browser allows add margin html element, explainations ?

the phrogz.net article wrong. that's not how works @ all. html element block-level element can styled pretty other block level element (including applying display:inline; wish!)

your page painted on canvas of (logically) infinite dimensions has origin @ point (0, 0). browser has viewport shows area of canvas. there exists rectangular block called initial containing block top left hand corner @ (0, 0) , has height , width equal of viewport. root element's position , dimensions can specified relative initial containing block, other block element's position , dimensions can specified relative containing block.


as aside, css not html. work dom created in namespace source. in particular work doms created xml. root element not <html> element.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -