in reply to Weirdness under IE6

What you are seeing under IE6 is a correct implementation of how attributes - in this case, alignment of the contents of table cell - are inherited from parent tables. So, if a page is built using nested tables, and the outmost table has its cells centered, then unless child tables explicitly set their cell alignment, they will inherit the centered alignment from their parent.

This is how styles are meant to be implemented under the latest W3C standards. However, there are many browsers that are "broken" to a greater or lesser degree. Netscape 4 browsers are severely broken, IE5 is broken to a lesser degree. From what I understand, IE6 is almost completely compliant to the HTML 4.01 / XHTML 1.0 and CSS 2 standards.

IE6 will be the standard browser version on Win XP. I personally would have thought that moving to a version of a product that supports current standards is a good thing.

Replies are listed 'Best First'.
Re: Re: Weirdness under IE6
by OeufMayo (Curate) on Sep 02, 2001 at 05:16 UTC

    After checking the CSS1, CSS2 and HTML4 specifications, I think that no browser, be it IE6 or Mozilla get it right.

    The reason is quite simple: the 'align' attribute doesn'txist anymore in CSS2, and is deprecated in HTML4.
    The problem is that it should be replaced by the attribute 'text-align' in a CSS, but these two attributes dont have the same function: 'align', in HTML means 'The table is to the center of the document. '(1) and text-align in CSS means 'This property describes how inline content of a block is aligned.' (2)

    So, while I'm all with using standards and all that, you may have noticed that the generated perlmonks pages are in HTML 4.01, which doesn't uses CSS2, and which supports (though in a deprecated manner) the table align attribute.

    What I find really strange is that IE6 can't use the DOCTYPE of a HTML to act accordingly and not impose a displaying method (CSS2) which wasn't released when HTML 4.01 was implemented! :)

    <kbd>--
    my $OeufMayo = new PerlMonger::Paris({http => 'paris.mongueurs.net'});</kbd>

      The actual CSS property is "text-align", with the default value in CSS(x) being "inherit". I believe that in the "pre-CSS" days, the default value for the (now deprecated) HTML align attribute was "left".

      I suspect that the layout engine designers for IE6 took a few short cuts, and did not look at the DOCTYPE value (mind you - how many web designers put a proper dtd line as the first lie of their HTML, before the >head< tag?) and chose the default bahaviour accordingly?

      I guess this is a problem us web developers will have to live with - the browser developers giving us fluff rather than complying with standards. I mean, HTML 4.01 and CSS 1 have been with us for a few years now.

      I guess the only way we can handle things is where layout is important, specify things explicitly - don't rely on someone else assuming the correct default bahaviour.

Buzzcutbuddha (Unsure of correctness of alignment): Re: Weirdness under IE6
by buzzcutbuddha (Chaplain) on Sep 22, 2001 at 05:08 UTC
    The very day that the Beta of IE 6 came out, the weirdness was noted and tracked down to two things:

    1. Some scattered center tags
    2. Nested tables inheriting the center alignment from their parent table

    We all know what the center tag does, but no one is sure if, as elements, tables are supposed to inherit the alignment from their container.