center table

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
<table width="640" cellpadding="0" cellspacing="0" id="mainTable">

 border : 1px;
 border-color: black;
 width: 640px;
 margin-left: auto;
 margin-right: auto;

The above code centers the table using opera 7.0 but not with IE 6.0. I like
to do this using css and not html. Is there something Im missing ?

Re: center table

Quoted text here. Click to load it

This would be better as
border: 1pxs solid black;
border-width: 1px;
border-style: solid;
border-color: black;

Quoted text here. Click to load it

It will work in Win IE6 if you include a doctype that triggers
standards mode rather than quirks mode. See

It will not work in Win IE5.5 and lower.


"My theories appal you, my heresies outrage you,
 I never answer letters and you don't like my tie."  - The Doctor

Re: center table

earl wrote:
Quoted text here. Click to load it

MSIE has more then a few bugs. Workarounds here:

David Dorward                              /

Site Timeline