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? > ______________________________________________________________________ > 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/ > > Well, it won't confuse a browser that won't center with margin: auto (such as IE 7 in quirks mode). And for some reason they're taking the page out of the normal flow so maybe they had a reason for that? Other than that, I can suggest that you could also do it as:
#pageWrapper { width: 760px; margin: 0 auto; } Which saves a few more bytes of data which means faster download times for your clients, sure not by much, but each optimization is still an improvement :) -- Thanks, Jim ______________________________________________________________________ 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/