W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2002

a problem with CSS and MicroSoft Internet Explorer

From: Jean-Claude Grégoire <a-altair@wanadoo.fr>
Date: Fri, 8 Mar 2002 01:26:16 +0100
Message-ID: <001301c1c638$1887b660$88d9f8c1@2>
To: <html-tidy@w3.org>
To Dave Raggett care of <html-tidy@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 Thursday, 7 March 2002 19:29:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:51 UTC