|
The biggest problem with "tricks" like this is somewhere along it is going to mess up your pages.
It's nothing specially new, anyone who has been designing with CSS for a appreciable time is already aware that the html & body can be resized and will be (or should be) already aware of the potential pitfalls.
One of the major benefits of using CSS is the flexibility a designer / coder has when updating or redesigning. Resizing the parent html element or the body element removes some of that flexibilty.
so lets look at one scenario;
A couple of months ago, you have designed a site for a fixed width of 800px and clever you, used this trick of html: {width:768px;} because it saved a couple of lines of HTML code and maybe 10 - 12 lines of CSS code, and it works perfectly, big pat on the back. Client happy. Pays the invoice promptly (Yep he's that happy!)
Now client returns and he has a new machine and shiny new monitor ( 22" at 1600 x 1200 ) on his desk, upon which he has decided the pages look "lost", and he wants to have it a little wider AND have the header to be full screen width with the content section centred (T shaped).
Oh Bo!!oxs !!
Now with a wrapper div this is the work of a few minutes, move the header outside the wrapper, widen the wrapper and tweak the child elements to suit, maybe not even that, if the widths are proportional. Any absolute positioned items should simply take up their positions from the wrapper or the html parent.
Your design doesn't have a wrapper and it is the ultimate parent sets that width, so now you have to add that wrapper anyway, and test all your positioning because the ultimate parent has moved.
The few minutes has gone to possibly several hours. And the bill to the client has gone from £30 - £40 to maybe £300 - £400 for what the client perceives is a minor update to a brand new site.
Whoops! repeat business, word of mouth business just took a downhill ride.
The moral is;
Always be aware that messing with the fundamentals of anything could have far reaching consequences.
I am not saying not to try this on a test site, just don't do it on a client site.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|