I recently read an article that talked about applying style rules directly to the HTML element (font, background, etc.). The article then cited how the author uses the BODY element to replace the oh-so-common "wrapper" div. Is there any peril to applying styles to the HTML element? Do any browsers choke or fail to display styles applied in the HTML element?
if you are talking of the direct tag e.g. <body width="1000px" height="800px"> then HTML can do most of it, check what is allowed. but it is a hell of a lot better, easier & quicker to change if you use CSS
I don’t think I was clear with my first post. I am talking about using css. Here’s a code block that should make my question a little clearer:
background: #333 url(someimage.jpg) repeat-x top left;
font: normal 1.2/1 arial, serif;
My question is if anyone knows of any issues with support in any of the major browsers when applying these style rules directly to the html tag (element). I hope this is more clearly stated now.
My biggest concern would be absolutely positioning the body element in this case. Normally I set the parent of any position: absolute element to position: relative. In this case that would be the html element and I wonder if this causes any browsers to have display issues (or any other related issues to styles in the html element).
Thanks so much apostrophe, I thought there might be some issues such as the ones outlined in that post. This was very informative and helped a lot. I don’t think I’m going to give up my trusty "wrapper" div just yet. :)