473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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
6 5487
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Phil Powell | last post by:
Code: <!-- script src="/js/val_header.js"></script --> <style> <!-- BODY { scrollbar-3d-light-color:#eeeedd; scrollbar-arrow-color:#000000; scrollbar-base-color:#000000;...
1
by: TJS | last post by:
can someone tell me why the selected item won't reflect user change in this little droplist example <%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(ByVal sender As Object,...
4
by: FlyingsCool | last post by:
Well, I did a search and found a few references with a similar subject but no answers for me. At http://www.flyingscool.com/FC_eLearning.htm I have a table row with a background image using the...
1
by: pstephen01010101 | last post by:
I've ran out of debugging ideas. If anyone knows why this won't run in IE 6 please let me know. It works fine in Fire Fox 2.0.0.3 and Netscape (version unknown). I suspect there is something basic...
1
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and...
13
by: Stevo | last post by:
I've found that for IE6+, if you add the property text-align:center to a DIV, then *anything* inside it gets centered. That can be a table, an object/embed, another DIV, an image, or some text. ...
5
tjc0ol
by: tjc0ol | last post by:
Hi all, I made contact page which allows visitors to input their name, email address, phone number, comments and select a comment type by using <select> element in html with javascript. Among the...
2
by: shannona | last post by:
I've been banging my head against an interaction between a table and float element. I want the two of them to together take up 100% of the width of their container. If the table cells' content...
3
by: therio7 | last post by:
Anyone can help me with my code? If you look at my page http://www.vitrail-entete.com/tdj/quoi_de_neuf_test.php When you mouseover the thumbnails on each row all the larger images appear in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.