[thelist] table cells suddenly centering...

Jon Haworth jhaworth at witanjardine.co.uk
Fri Aug 31 05:52:35 CDT 2001


> >I went into my page and removed all of the "center" code I could 
> >find and it still centered my text. Once I went in and explicitly 
> >labeled my td's with align="left", it stopped happening. I actually 
> >never made the connection between the sudden centering of that page 
> >and my upgrade of IE!
> 
> I'm on a Mac, so I can't test IE 6. Can we clarify here which IE 6 is 
> rendering?
> 
> What we first discussed, that nested tables are inheriting the 
> alignment of the parent <td>,
> or does IE 6 actually default to cells align=center, which is not the
standard?
> 

Righty ho, I fired up my shiny new install of IE 6 final release (on Win2k),
and did two tests - one with just an <html> at the top of the page, and one
with the XHTML 1.0 strict DTD and an <html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">.

After the <html> tag, I had:

<head>
  <title>Bloody browsers</title>
</head>
<body>
<table>
  <tr>
    <td>Hello world!</td>
  </tr>
</table>
</body>
</html>

Both tests had the text aligned left, so I guess that's the default.

Seeing as my boss hasn't turned up yet, I thought I'd carry on and check the
inheritance :-) I changed the <body> to this:

<table>
  <tr>
    <td align="center">
      <table>
        <tr>
          <td>Hello world!</td>
        </tr>
      </table>
    </td>
  </tr>
</table>

And both versions (plain <html> and XHTML stuff) still align the text to the
left.


Cheers 
Jon


**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**********************************************************************





More information about the thelist mailing list