views:

68

answers:

2

I often inspect sites using firebug and have noticed quite a range of complexity in the way developers wrap their content. Looking especially at centered aligned layouts:

At the simplest end are sites like 99designs.com which simply apply a margin: 0 auto to the body element.

Body -> Header/Content/...

Next along the scale are most other sites, with stackoverflow being a prime example. These sites have some kind of main container, within which the header and the content for example reside

Body -> Container -> Header/Content/...

Further than this are sites which have multiple wrappers. Normally there is a large outer wrapper which consumes the entire page just like body, and within that they have the central container as in the example above.

Body -> Wrapper -> Container -> Header/Content/...

Sometimes columns divs are defined, within which there's a left and a right column. Othertimes people achieve the same left and right column without the need for any surroundnig column or content div.

So my question is, why isn't everyone doing it the most simple way, such as in 99designs. Is it to manage their styling, handle ie6 or what?

Any thoughts?

+3  A: 

Because no one design fits everybody's application.

Developers are going to go with what they're comfortable with and what works. If I can get my page done in two days using what I know (and get it to work cross-browser) then I'm not going to waste my time (and my client's money) by trying to do things the 99designs.com way and taking a week.

Justin Niessner
Thanks, perhaps my question sounded subjective but I was really looking for any technical reasons if there are any.
zenna
What I was getting at was that it's usually a combination of technical reasons and staffing issues. If a developer knows how to accomplish something technically a certain way...they'll do it that way (but that way may be different than how another developer would do it).
Justin Niessner
+1  A: 

The reason you may find additional DIVS like wrapper and container and the like has to do with CSS. The CSS box model is powerful, but to achieve certain layouts, sometimes you need additional boxes to work with. It is all highly subjective, and you can't predetermine what divs you will need for a site design until you sit down to build it. There is no one way or right way to use divs in a site design. The more visually complex, often the more complex the markup is. You generally want to keep it as simple as possible...but you can't just keep things absolutely simple just because.

jrista