matthijs abeelen wrote:
That's an issue I have been thinking about too. As i started learning
css I just assumed a  container div was a necessity in the standard
fixed-width 750px layouts. It's hard to find a site that doesn't use
one.
Untill I found these examples/articles:
http://jero.net/archive/2005/06/03/yes-the-html-element-can-be-styled/
and this one:
http://jasonspage.net/blog/nodiv/

It seems to work very well. So, it seems a container div is not
necessary. Only if you really need it for extra styling. Or are there
any secret bugs/problems I am not aware of with styling the html
element??

I don't secure the doctrine that an additional wrapper div would be bad practice, a strong sign of divitis, or whatever.

And I can't see the point why the recommendation to omit an additional div should help CSS beginners to become better coders.

Neither why a code with /one/ div less should be better at all. For what reasons? Where is the evidence that one div less is good?

Besides of this, there seem to be technical problems with that attempt, but I am not sure about them, I don't have the time to investigate them thoroughly, so the following might be wrong.

I have two questions regarding the attempt to omit the wrapper and move the declarations from the wrapper to the body, and from the body to the html.

* What about IE 5.5 / IE6 in quirks mode ?

This page you've cited
http://jero.net/archive/2005/06/03/yes-the-html-element-can-be-styled/
reads: "I’m happily using my HTML element to define my background and the fonts I’m using, while the BODY is used as a container element to center it with CSS."

I wonder if it's my IE5.5 standalone installation, but the page is not centered in IE5.5. On a downloaded local version (via Fx Scrap book), and put into quirks mode, the problem is valid too.
The same is true for
http://jasonspage.net/blog/nodiv/

A test case

- for IE5.5 with wrapper:
http://www.satzansatz.de/cssd/tmp/wrap/center_ie55_wrapper.html

- for IE5.5 without wrapper:
http://www.satzansatz.de/cssd/tmp/wrap/center_ie55.html

- for quirks mode IE6 (via xml declaration) without wrapper:
http://www.satzansatz.de/cssd/tmp/wrap/center_ie6quirks.html

shows that IE 5.5standalone / IE6 in quirks mode does not center the body via text-align: center from html, does not apply the width to the body, and encloses the scroll bar with the border.


* What about Opera8?
Opera 8 has a bad print preview bug: it takes the background color of the body in the /screen/ style sheet to the /print/ style.

Print-preview this in Opera8/Win:
http://www.satzansatz.de/cssd/tmp/wrap/operabgbug.html

In print preview, with the default settings, Opera8 tend to believe that the bg-settings for body made in the screen.css have to be applied.

The ugly workaround is to explicitly set the desired bg-color in the html-element of the /screen/ style sheet.

Print-preview this in Opera8/Win:
http://www.satzansatz.de/cssd/tmp/wrap/operabgbug_fixed.html

So Opera8 needs this html element for bug fixing purpose.

---

Again, these tests are not necessarily correct.

The reason why I keep on wrapping a page might be just out of habit.

Ingo

--
http://www.satzansatz.de/css.html
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to