TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The body element is already a wrapper.

5 pointsby westondeboerabout 14 years ago

1 comment

Klonoarabout 14 years ago
Before anybody goes off and starts using this everywhere, you need to keep one thing in mind:<p><i>You want one wrapper to be the viewport size (at least) for modal dialogs and other UI bits.</i><p>By using the &#60;body&#62; 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.<p>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.