korkus2000

msg:3829536 | 3:02 pm on Jan 19, 2009 (gmt 0) |
You need to have a container element. We will say a div that contains all the elements you want centered. You may already have this element. Add this style to it: margin: 0 auto; You also need to add body { text-align: center; } That is for older browsers like IE 6 I believe.
|
Corey Bryant

msg:3829837 | 9:11 pm on Jan 19, 2009 (gmt 0) |
Hopefully you are also relying on an external sheet to help you maintain the consistency of the layout as well. Here is another example
body { margin:0px auto; padding: 0px; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 1.0em; text-align: left; background: #fff; color: #000; } div.wrapper { width: 921px; margin: 0px auto; text-align: center; } div.maincontainer { width:960px; text-align: left; } And then in your HTML code, something like
<div id="wrapper"> <div id="maincontainer">Lorem Ipsum </div> </div>
|
CATraveler

msg:3829945 | 11:48 pm on Jan 19, 2009 (gmt 0) |
Thanks for the feedback, worked like a charm.
|
|