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

Why won't IE6 center this table?

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.