Grow your CSS skills. Land your dream job.

Wrapper body width

  • # June 22, 2013 at 4:47 pm

    Hi guys

    Can’t figure out why some developers make wrapper the same width as a body? In what circumstances I have to do it?

    # June 22, 2013 at 6:26 pm

    Do you have any example? I’m not sure what you mean.

    By the way, some developers are still kind of reluctant from using the body as the main wrapper.

    # June 23, 2013 at 1:50 am

    Here is example http://rutracker.org/forum/index.php **body_container** he doesn’t have special properties. And I saw sach layout in more sites.

    # June 23, 2013 at 3:55 am

    > In what circumstances I have to do it?

    When you come across a situation where it’s required to solve a problem.

    I have no idea what that situation might be but after while it might just become habit…like using a reset

    # June 23, 2013 at 4:49 am

    Before I knew that it’s bad habit to set width to body, but then I have read this article http://csswizardry.com/2011/01/using-the-body-element-as-a-wrapper/
    Which variant is better to use?

    # June 23, 2013 at 4:56 am

    > Before I knew that it’s bad habit to set width to body

    There are two very different things here:
    - setting a fixed width to any container is kind of “bad habit” since it will break at lower screensizes
    - using the body as a container is not a bad habit, it’s perfectly valid

    # June 23, 2013 at 7:06 am

    I never had experience to build responsive page, but for fixed page body as a wrapper seems quite natural

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

You must be logged in to reply to this topic.

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