Grow your CSS skills. Land your dream job.

Wrap – body

  • # February 22, 2011 at 4:17 pm

    Why are you always using div#wrap …. why not use the body-tag in the way you normaly use the #wrap

    …… hope you understand ….

    # February 22, 2011 at 4:32 pm

    Because sometimes you want to apply a seperate background to the body that expands the full browser.

    In most cases, you won’t always want all items to be contained within a wrap (a footer, for example).

    # February 22, 2011 at 5:01 pm

    Another example would be like Facebook’s chat box in the bottom left or sometimes people put social networking buttons on the side of the screen. In order to cover all possibilities, it’s easy to just put a page-wrap around everything. That way everything is nice and centered and if you want to put something outside it, like in the corner or on the site, it’s relatively easy.

    # February 22, 2011 at 5:48 pm

    I don’t think using the body tag for that is a good idea anyway.

    # February 22, 2011 at 7:25 pm

    I’ve found that it’s good practice to leave the tag selectors alone.

    In some corporate environments they contract out for SEO “specialists” who run shit up and down the background for robots to find and I’m sure they don’t always check before hand to see if you are modifying any of the selectors. Not to mention jr web techs that may use the code in the future, greasemonkey scripts…

    # February 26, 2011 at 5:42 am

    Thanks – This makes sense

    But what about a “mobile-phone-site-only” … Iphone/Android … can I use the body tag instead of the wrap div?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".