Click to See Complete Forum and Search --> : Centering


Kdarius
04-13-2005, 10:51 PM
hey sorry i am working on the ocaf website its my first one
i changed the cover page so it worked for the 800*600 but now i was wondering is there anyway to center the whole page so when you do go to the higher resolution it will be centered with even black on both sides and not alot on just the right hand side; such as the nascar.com page when you change the resolution with it up.
Thank you so much
Darius

ray326
04-14-2005, 12:02 AM
1. Redo the design sans-frames.
2. Pitch whatever piece of MS Office you're trying to use for an editor and get HTML-kit (http://htmlkit.com). (Poof, your pages are now 1/3 the size they were before and you have a chance to make them usable, too.)
3. Return here and get some advice you can actually use because you're no longer tripping over MSO and falling through frames.

You center your content by wrapping it in a div with a fixed width and setting the margin-left and margin-right to auto. For older versions of IE you'll also have to apply text-align:center to the container of that wrapping div.