Quote:
Originally posted by Luke Redpath
FWIW, Opera have got it right...in CSS box model terms at least, margin is space outside of a box and padding is inside, so in the case of body, it should be padding really.
|
Not so fast there, sonny-jim.
The body ≠ the viewport.
Similarly, the body doesn't by definition automatically fill the viewport.
There is indeed a form of padding 'within' the viewport that creates a kind of no-man's land which has prematurely (and problematically) been titled the browser offset margin.
However, when seeking to remove the gap we don't address the viewport, we address the body.
The spacing is 'around' the body, so in relation to the body it is margin, not padding. We cannot address the gap as 'spacing within' the viewport (padding), so we must address it as 'spacing around' the body (margin) by zeroing the margin with css.
This particular semantic quagmire is what lead to two interpretations, both of which can be argued to be correct (from a certain viewpoint).
The one thing that is clear is that the spec regarding the dom definitions, extent and roles of the viewport, html and body should be made much clearer than they are or at least enforced one way.
The purpose behind W3C was to stop browser developers trying to think for themselves.
As soon as they start doing things like that we end up with diverging methods all over again- such as with the case in hand.
And of course, it's always the poor, bloody web-designers/developers that are the canon fodder.
So forgive me when I say that, personally, I'd just like to see Opera shut up and do as they are told. In this instance I don't really care about how they think it should work.
There is no major headache by doing it one way or the other, so by bucking the trend they are simply defeating the purpose of unified support for W3C recommended standardisation.
I can't help thinking that, as well-meaning as the folks at Opera are, they are missing the point just a tad.
But anyway...
Anyone else here think that
24 is blatantly a load of tosh?