[thelist] Centered Container DIV

Minh Lee Goon evolt at goonies.info
Tue May 24 08:41:12 CDT 2005


Hi all,

I would like to develop a web site that is centered on the screen, but I 
can't seem to do this as neatly as I'd like. Here's an example of my code:

<body>

<div id="container">

</div>

</body>

Here's my stylesheet:

#body {
     text-align: center;
}
#container {
     width: 660px;
}

In Firefox, the container DIV is not in the center, but it is in IE. I 
can wrap my container DIV in <div align="center"></div>, but I'm looking 
for a cleaner way of writing the code, if there is one.

Thanks.

Minh Lee Goon

digerati design studios
www.digeratidesignstudios.com



More information about the thelist mailing list