467,077 Members | 952 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

Why won't IE6 center this table?

See http://ataru.gomen.org/files/test.html:

<html>
<head>
<title>Test page</title>
<style type="text/css">
.center { margin-left: auto; margin-right: auto }
</style>
</head>
<body>
<table class="center">
<tr>
<td>Hello</td>
<td>World!</td>
</tr></table></body></html>

Why won't IE6 center the table, where Opera 7 and NS 7.1 render it just
fine, and especially where IE6 renders what appears to be exactly the
same table at http://theodorakis.net/tablecentertest.html correctly?
What the heck gives?

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 20 '05 #1
  • viewed: 5270
Share:
6 Replies
Christopher Benson-Manica <at***@nospam.cyberspace.org> spoke thus:
<html>
<body> <h1 class="center">Hello, world!</h1> <table class="center">
<tr>
<td>Hello</td>
<td>World!</td>
</tr></table></body></html>


And why don't either IE6 or NS7 center the header, but links (a
text-based browser that barely understands Javascript, for crying out
loud!) centers the header? *sigh*

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 20 '05 #2
Christopher Benson-Manica wrote:
.center { margin-left: auto; margin-right: auto } Why won't IE6 center the table


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

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #3
Christopher Benson-Manica wrote:
<h1 class="center">Hello, world!</h1> And why don't either IE6 or NS7 center the header
http://dorward.me.uk/www/centre/#iVsB
, but links (a
text-based browser that barely understands Javascript, for crying out
loud!) centers the header?


Links centres <h1> content by default.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #4
On Thu, 6 May 2004 18:56:39 +0000 (UTC), Christopher Benson-Manica
<at***@nospam.cyberspace.org> wrote:
See http://ataru.gomen.org/files/test.html:

<html> ....
Why won't IE6 center the table, where Opera 7 and NS 7.1 render it just
fine, and especially where IE6 renders what appears to be exactly the
same table at http://theodorakis.net/tablecentertest.html correctly?
What the heck gives?


Do a Google search on Quirks mode rendering.
--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #5
Rijk van Geijtenbeek <ri**@opera.com> spoke thus:
Do a Google search on Quirks mode rendering.


I had no idea such a thing existed - yeesh, and thank you :)

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 20 '05 #6
Lal
Christopher Benson-Manica <at***@nospam.cyberspace.org> wrote in message news:<c7**********@chessie.cirr.com>...
See http://ataru.gomen.org/files/test.html:

<html>
<head>
<title>Test page</title>
<style type="text/css">
.center { margin-left: auto; margin-right: auto }
</style>
</head>
<body>
<table class="center">
<tr>
<td>Hello</td>
<td>World!</td>
</tr></table></body></html>

Why won't IE6 center the table, where Opera 7 and NS 7.1 render it just
fine, and especially where IE6 renders what appears to be exactly the
same table at http://theodorakis.net/tablecentertest.html correctly?
What the heck gives?


Give the style as

<style type="text/css">
.center { margin-left: auto; margin-right: auto; text-align: center}
</style>
Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by TJS | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.