Setting "text-align: center" won't affect the floated elements inside
a container.

Try this:

body {
  text-align: center; /* for IE */
}

#root {
  margin: 0 auto;   /* to center the stuff */
  text-align: left;    /* fix text aligning */
  width: 70%;
  padding: 2%;
  background: #555;
  overflow: auto;   /* to wrap floats */
}

HTH,
Prabhath
--
http://nidahas.com


On 5/6/06, ANONYMOUS <[EMAIL PROTECTED]> wrote:
> Here is a snippet of the code:
>
> <html>
>   <head>
>     <title>Some Title</title>
>     <style type="text/css">
>       body { background-color: #000000; margin-top: 0; }
>       #root { width: 70%; display: block; background-color: #555555;
> padding: 2%; float: left; }
>       #left { width: 70%; float: left; background-color: #777777; }
>       #right { width: 30%; float: right; background-color: #999999; }
>     </style>
>   </head>
>   <body>
>     <div id="root">
>       <div id="left">
>         LEFT<br><br>LEFT<br><br>LEFT<br><br>
>       </div>
>       <div id="right">
>         RIGHT<br><br>RIGHT<br><br>RIGHT<br><br>
>       </div>
>     </div>
>   </body>
> </html>
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
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/

Reply via email to