Les,
On May 25, 2007, at 11:30 AM, Les Mizzell wrote:
> It's always interesting to look at other folks stuff. I just
> inherited a
> site, and in looking at their CSS, the main div is listed thusly:
>
> #pageWrapper {
> width:760px;
> position:absolute;
> left:50%;
> margin-left:-380px; }
>
>
> Where I would have just done:
>
> #pageWrapper {
> width:760px;
> margin: 0 auto 0 auto; }
>
> Any advantage of doing it the first way?
There is a major drawback to the first way. If the user's window is
less than 760px wide, content will flow off the left edge of the
window and become inaccessible. It the page has to be in quirks
mode, or you need to support ie5/win, you can get the same result with
body { text-align: center; }
#pageWrapper {
width: 760px;
margin: 0 auto;
text-align: left;
}
--
Roger Roelofs
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/