N
Nathan Sokalski
I have several locations on my site that have tables inside elements such as
divs that specify the text-align:center; CSS property. When IE8 is not in
compatibility mode, this is ignored by tables that are children of the tag
the property is specified in. I have only noticed this with table tags.
Here is a simple page I have written to demonstrate this:
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body>
<div style="text-align:center;">
<table><tr><td>Table</td></tr></table>
</div>
</body>
</html>
When you run this in IE8, be sure to try viewing it in compatibility and
non-compatibility mode. Correct me if I'm wrong, but I believe that when
following standards, text-align:center; should center any children. If IE6,
IE7, and IE8 Compatibility Mode follow this simple standard, why would
Microsoft not follow the standard in IE8's non-compatibility mode? Is this a
bug, is there some reason I don't know of, or is there really something
wrong with my code? Thanks.
divs that specify the text-align:center; CSS property. When IE8 is not in
compatibility mode, this is ignored by tables that are children of the tag
the property is specified in. I have only noticed this with table tags.
Here is a simple page I have written to demonstrate this:
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body>
<div style="text-align:center;">
<table><tr><td>Table</td></tr></table>
</div>
</body>
</html>
When you run this in IE8, be sure to try viewing it in compatibility and
non-compatibility mode. Correct me if I'm wrong, but I believe that when
following standards, text-align:center; should center any children. If IE6,
IE7, and IE8 Compatibility Mode follow this simple standard, why would
Microsoft not follow the standard in IE8's non-compatibility mode? Is this a
bug, is there some reason I don't know of, or is there really something
wrong with my code? Thanks.