On Jun 21, 2012, at 18:35 , David Hucklesby wrote:

> What benefit is there to a "wrapper" DIV on a web page?
> 
> It seems to me that the BODY element serves all that's needed for styling a
> page. It can have a width; can be centered with auto side margins; can have
> its own background; has a new block-formatting context; and elements can be
> positioned relative to it. All this without any CSS that a wrapper DIV may
> need to have these properties.
> 
> I can only imagine there is some CSS reason for the extra markup, but so far
> have not found it. Anyone?

I agree with your assumptions.
I still use some wrapper element here and there, on given cases.

For example:
I normally use one wrapper element when I wish to make a visual distinction. 
Regardless the monitor / resolution, I wish that my content (inside that 
wrapper) stays centered, but still, allow users with big monitors to see a 
visual continuation flow by adding some background to the body.

Perhaps I'm not seeing it properly, but until know, I'm taking the body element 
as the "viewport area" and the wrapper as the "content container area";


Regards,
mem
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to