By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,986 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,986 IT Pros & Developers. It's quick & easy.

center tables with CSS

P: n/a
Hi,

I have a problem with CSS. I read in other postings that it should be
possible to center tables by

TABLE {margin-left:auto; margin-right:auto}

in an external stylesheet.
But it doesn't work with IE 6.0 as it seems.
I have to center my tables with

<table align="center">.

Can anybody help me. Thanks.

Bye

Bastian
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Els
Bastian wrote:
I have a problem with CSS. I read in other postings that it should be
possible to center tables by

TABLE {margin-left:auto; margin-right:auto}

in an external stylesheet.
But it doesn't work with IE 6.0 as it seems.
I have to center my tables with

<table align="center">.


Doesn't sound correct.
Have you set a width on the table? Have you used a doctype?
It should work in IE6.

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #2

P: n/a
da**********@onlinehome.de (Bastian) wrote:
I have a problem with CSS. I read in other postings that it should be
possible to center tables by

TABLE {margin-left:auto; margin-right:auto}

in an external stylesheet.
But it doesn't work with IE 6.0 as it seems.


Are you triggering quirks or standards mode? If standards mode then
this will work in IE6. If quirks mode then it won't.

Steve

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

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3

P: n/a
Bastian wrote:
TABLE {margin-left:auto; margin-right:auto}
But it doesn't work with IE 6.0 as it seems.


<http://dorward.me.uk/www/centre/#ie>

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.