W3C home > Mailing lists > Public > www-validator-css@w3.org > March 2002

a problem with CSS and MicroSoft Internet Explorer

From: Jean-Claude Grégoire <a-altair@wanadoo.fr>
Date: Thu, 7 Mar 2002 19:19:19 -0500 (EST)
Message-ID: <000301c1c636$b8983140$88d9f8c1@2>
To: <www-validator-css@w3.org>
Good morning,

I have a problem with CSS and MicroSoft Internet Explorer.

If my html file (xxxxx.htm) is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.01 Transitional//EN">
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>html 1.01 or 4.01 ?</title>
<link rel="stylesheet" type="text/css" href="style.css">
<table width= "200" summary="xyw">

and my "style.css" is:

body {
 background: #00cc00; color: #000000;
table {
 margin-left: auto; margin-right: auto; background: #ffddff;

MSIE (vers. 6.0), Netscape (vers. 6.2) and Opera (vers. 6.0) understand that
perfectly and give me a "rose table" in the center of a green page.

Then I test my html file with Tidy. Result:

Tidy (vers 30th April 2000) Parsing "xxxxx.htm"
"xxxxx.htm" appears to be HTML 4.01 Transitional
no warnings or errors were found

As a result, I follow the advice of TIDY and I change the text of the line
#1 of my html file to this one :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Now MS Internet Explorer (vers 6.0) doesn't understand the code:

"margin-left: auto; margin-right: auto;"

any more, and my rose table goes to the left side of the screen!...

I haven't this problem with Netscape 6.2 or Opera 6.0.

How do you understand this phenomenon? What's the remedy? What must I do?

Thanks in advance.

Yours Sincerely.

Jean-Claude Grégoire
12120 Rulhac-St-Cirq
Received on Wednesday, 13 March 2002 17:02:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:00:48 UTC