Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

Table tag refuses to obey the CSS text-align property in non-compatibility mode in Internet Explorer 8

microsoft.public.internetexplorer.general






Speedup My PC
Reply
  #1 (permalink)  
Old 02-22-2010
Nathan Sokalski
 

Posts: n/a
Table tag refuses to obey the CSS text-align property in non-compatibility mode in Internet Explorer 8
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.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-22-2010
rob^_^
 

Posts: n/a
Re: Table tag refuses to obey the CSS text-align property in non-compatibility mode in Internet Explorer 8
Understanding !Doctype - http://www.google.com/search?q=understanding
doctype

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
...... blah blah blah
<body>

<div id="divPageWrapper">
<!--[if lt IE 6]>
<center>
<![endif]-->
<div id="divTop1000"></div>
<div id="divContent">
<table id="tabContent" style="text-align:left">
<tr>
<td align="right" style="text-align:left">
...... etc..


vs'

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd">
..... ditto above....

Confused? Validate your markup to your chosen DTD. Choose a DTD that will
accommodate the majority of your site visitors.

HTML and CSS are not programming languages. They are not compiled before
they are served up to a browser and so the standards are subject to
interpretation.

No seriously.... Unless you include a DTD with your examples they are
useless. See Quirksmode.org

Regards.

"Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
news:F5C9784C-4B51-4EB5-A165-1D3152067716@microsoft.com...
> 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.
> --
> Nathan Sokalski
> njsokalski@hotmail.com
> http://www.nathansokalski.com/


Reply With Quote
  #3 (permalink)  
Old 02-22-2010
Nathan Sokalski
 

Posts: n/a
Re: Table tag refuses to obey the CSS text-align property in non-compatibility mode in Internet Explorer 8
I guess I've been developing web for so long that I didn't even bother to
copy that part to my post (but I did include it in my page when I tested,
honest). I used the Transitional in my code. I hesitate to use the Strict
because for the most part, my pages are generated with ASP.NET, which still
generates some html that Strict might not like. Do you think Strict would
make a difference with the text-align/table situation? Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

"rob^_^" <iecustomizer@hotmail.com> wrote in message
news:58A0154B-BE86-4CF8-8101-2A23D25D06B1@microsoft.com...
> Understanding !Doctype - http://www.google.com/search?q=understanding
> doctype
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> ..... blah blah blah
> <body>
>
> <div id="divPageWrapper">
> <!--[if lt IE 6]>
> <center>
> <![endif]-->
> <div id="divTop1000"></div>
> <div id="divContent">
> <table id="tabContent" style="text-align:left">
> <tr>
> <td align="right" style="text-align:left">
> ...... etc..
>
>
> vs'
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> .... ditto above....
>
> Confused? Validate your markup to your chosen DTD. Choose a DTD that will
> accommodate the majority of your site visitors.
>
> HTML and CSS are not programming languages. They are not compiled before
> they are served up to a browser and so the standards are subject to
> interpretation.
>
> No seriously.... Unless you include a DTD with your examples they are
> useless. See Quirksmode.org
>
> Regards.
>
> "Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
> news:F5C9784C-4B51-4EB5-A165-1D3152067716@microsoft.com...
>> 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.
>> --
>> Nathan Sokalski
>> njsokalski@hotmail.com
>> http://www.nathansokalski.com/

>

Reply With Quote
  #4 (permalink)  
Old 02-22-2010
PA Bear [MS MVP]
 

Posts: n/a
Re: Table tag refuses to obey the CSS text-align property in non-compatibility mode in Internet Explorer 8
Developer-specific resources include:

MSDN IE Development Forum (post such questions here instead)
http://social.msdn.microsoft.com/For...opment/threads

IE Developer Center
http://msdn.microsoft.com/en-us/ie/default.aspx

Learn IE8
http://msdn.microsoft.com/en-us/ie/aa740473.aspx

HTML and DHTML Overviews and Tutorials
http://msdn.microsoft.com/en-us/library/ms537623.aspx and

Cascading Style Sheets (CSS)
http://msdn2.microsoft.com/en-us/ie/aa740476.aspx

Expression Web SuperPreview for Internet Explorer (free, stand-alone visual
debugging tool for IE6, IE7, and IE8)
http://www.microsoft.com/downloads/d...b-dccff3fae677

Expression Web SuperPreview Release Notes
http://www.microsoft.com/expression/...easeNotes.aspx

Validators:
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/


Nathan Sokalski wrote:
> 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.


Reply With Quote
  #5 (permalink)  
Old 02-22-2010
rob^_^
 

Posts: n/a
Re: Table tag refuses to obey the CSS text-align property in non-compatibility mode in Internet Explorer 8
Hi Nathan,

I am pulling your chain (a bit). The snippets that I supplied are from one
of my own asp.net master pages that I have developed and tested to be
browser agnostic. What it doesn't show you are the external stylesheets that
I use and the style rules for the block elements and the complexity of
trying to make things work in all browsers. (including IE7)

As you can see it is a mixture of depreciated attributes, conditional
comments, style rules and a transitional DTD to get it to work (as expected)
on all browsers. What I am trying to get across is that regardless of the
'standards', to code for the wild, you end up using rules and other
workarounds to "make it work".

"When IE8 is not in Compatibility mode" can mean two things, IE8 is using
either the Quirks or IE8 Standards rendering (browser) mode, so yes
including your DTD in your samples is important. You will find that
switching the IE8 browser mode is not exactly the same as running your pages
in the native ie versions.

Anyway..... the end game is that MS has closed down feedback for IE8 at
connect and are not taking any more issue reports or feature requests. I
haven't checked if this issue has been reported before but they also have a
test suite of css rules at http://samples.msdn.microsoft.com/ietestcenter .

I suppose the end game now is that there may still be outstanding issues
with IE8, but there is nothing we can do (at this time) to get it changed or
corrected. Developers (us) will just have to live with it and use
workarounds to 'make it work' as expected.

Regards.

"Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
news:8867ADD7-87B4-4F72-A9C6-5A697C08D1DE@microsoft.com...
> I guess I've been developing web for so long that I didn't even bother to
> copy that part to my post (but I did include it in my page when I tested,
> honest). I used the Transitional in my code. I hesitate to use the Strict
> because for the most part, my pages are generated with ASP.NET, which
> still generates some html that Strict might not like. Do you think Strict
> would make a difference with the text-align/table situation? Thanks.
> --
> Nathan Sokalski
> njsokalski@hotmail.com
> http://www.nathansokalski.com/
>
> "rob^_^" <iecustomizer@hotmail.com> wrote in message
> news:58A0154B-BE86-4CF8-8101-2A23D25D06B1@microsoft.com...
>> Understanding !Doctype - http://www.google.com/search?q=understanding
>> doctype
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> "http://www.w3.org/TR/html4/loose.dtd">
>> ..... blah blah blah
>> <body>
>>
>> <div id="divPageWrapper">
>> <!--[if lt IE 6]>
>> <center>
>> <![endif]-->
>> <div id="divTop1000"></div>
>> <div id="divContent">
>> <table id="tabContent" style="text-align:left">
>> <tr>
>> <td align="right" style="text-align:left">
>> ...... etc..
>>
>>
>> vs'
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
>> "http://www.w3.org/TR/html4/strict.dtd">
>> .... ditto above....
>>
>> Confused? Validate your markup to your chosen DTD. Choose a DTD that will
>> accommodate the majority of your site visitors.
>>
>> HTML and CSS are not programming languages. They are not compiled before
>> they are served up to a browser and so the standards are subject to
>> interpretation.
>>
>> No seriously.... Unless you include a DTD with your examples they are
>> useless. See Quirksmode.org
>>
>> Regards.
>>
>> "Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
>> news:F5C9784C-4B51-4EB5-A165-1D3152067716@microsoft.com...
>>> 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.
>>> --
>>> Nathan Sokalski
>>> njsokalski@hotmail.com
>>> http://www.nathansokalski.com/

>>

>

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed Height For Table Cell Using CSS in Internet Explorer Nathan Sokalski microsoft.public.internetexplorer.general 12 10-02-2009 05:06
Display does not align text properly Boblink microsoft.public.windows.vista.general 3 03-04-2009 00:53
td align="center" does not work in Internet Explorer 7 ameen microsoft.public.internetexplorer.general 1 11-17-2008 15:55
Internet Explorer 7 on XP (HE) refuses to close GooRoo microsoft.public.internetexplorer.general 4 10-02-2008 17:26
Pointer Shadow Refuses to Obey romanom microsoft.public.windows.vista.general 2 01-27-2008 10:44




All times are GMT +1. The time now is 13:45.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120