Previous Message
Next Message

what is a wrapper

Sent by Michael Landis on 31 January 2005 23:11


Keith wrote:

>i wonder if anyone could tell me what a wrapper is, i tried to  work it
out
> from some of the emails,but i am still non the wiser. I
>        would be extremely grateful if some one could let me know.
>        thanks

CSS Addict wrote:

> Hi Keith
> A wrapper is a main div that holds your other divs. Some call them
container
> divs, main content divs, and of course wrapper div.

Typically you'll find wrapper divs used when you find that you can't apply
styles to the content itself, or you need to apply style in such a way that
it won't work with just one element. Most layouts have divs that identify
things like content, left nav, top nav, etc. Wrappers typically are used
for presentational purposes but are not directly tied to the content.
Examples include a div that floats two columns left so that another column
appears to the right. The only purpose for that kind of div is to do
something stylistically that wasn't possible with the columns' divs
themselves.

Wrapper divs are not necessarily defined by the content they wrap. Although
the divs around the content, left nav and right nav typically can be
considered wrappers, wrappers can also be used on subcomponents, too. A
relatively positioned div that wraps an image and absolutely positioned
text within content, for example, is as much a wrapper as a main body
wrapper. Again, the div is not related to the content itself; it merely
serves a presentational purpose.

As a note, container divs can also be those that contain content, such as
the main column of a site that is referenced as <div id="content"> or
whatever. Container divs might have pseudo-structural value by identifying
what kind of content they contain, while wrapper divs rarely do so.

As Paul mentions, there are several ways to skin this cat -- it all seems
to revolve around the idea that a wrapper div "wraps" content to do
something with it.

HTH,

Michael

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: