1 comment

[ 1.6 ms ] story [ 7.6 ms ] thread
Before anybody goes off and starts using this everywhere, you need to keep one thing in mind:

You want one wrapper to be the viewport size (at least) for modal dialogs and other UI bits.

By using the <body> tag as your wrapper, ~99% of web tips that use it for doing position offsets (absolute/fixed with top/bottom/etc) will now be totally skewed.

I used to do this all the time myself, but I'll be the first to admit it's not as flexible or "cool" as people think. If I'm working on a project where I won't need aspects like this I'll still do it from time to time, but it is not without its drawbacks.