Previous Message
Next Message

Centre a Div

Sent by Thierry Koblentz on 26 March 2006 03:03


Joanne wrote:
> I'm just reading a tutorial that tells me to:
> "Wrap the whole page in a centering, relatively positioned <div>,"
> 
> I have the code for the relative position, but I don't know how to
> center the div.
> 
> <div id="everything"></div>
> 
> #everything{
> position: relative;}

Try this:

body {text-align:center}

#everything{
position: relative;
width:720px;
margin:0 auto;
text-align:left;
}

The text-align property is for IE 5 (and 6 in Quirks mode)

Regards,
Thierry | www.TJKDesign.com
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- 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/
Previous Message
Next Message

Message thread: