W3C home > Mailing lists > Public > www-style@w3.org > July 2004

Re: [CSS21] Test Suite

From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
Date: Thu, 22 Jul 2004 14:22:06 +1000
Message-ID: <40FF40EE.8010408@iinet.net.au>
To: Mark Moore <mark.moore@notlimited.com>
Cc: www-style@w3.org

Mark Moore wrote:
> It looks like I may have been too hasty with my assessment of IE6's
> rendering of PNG's from the barrage of IE-does-too-handle-PNG's responses.
> 
> So you can see how I came to this conclusion, I've attached a GIF of both
> Opera 7.51, and IE6 rendering the css1test412a.xhtml test.

   IE doesn't fully support <object> either, as you used in the 
attachment, so that is why the image did not show up.  If you change 
that to an <img/> element and fix the style block up so it doesn't get 
ignored by IE, you end up with code like the following.  You should also 
change the DOCTYPE to XHTML 1.0 since XHTML 1.1 *must not* be treated as 
text/html, as it is in IE, but at least is allowed by the specification. 
  (however, some still discourage its use because it relies on HTML user 
agents error handling)  However, for a purely XHTML test, your previous 
code was fine (except for the missing xml:lang attribute).  These 
changes just allow it to be either an HTML or XHTML test.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html 
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
     <title>CSS 2.1 Test Suite: Horizontal Formatting</title>
     <style type="text/css"><!--/*--><![CDATA[/*><!--*/
     p#ruled {
         font: 40px/1 Ahem;
         width: 360px; background-color: aqua; color: blue;
         border-style: solid; border-color: fuchsia;
         border-top-width: 0px; border-right-width: 40px; 
border-bottom-width: 0px; border-left-width: 40px;
         padding-top: 0px; padding-right: 40px; padding-bottom: 0px; 
padding-left: 40px;
         margin-top: 0px; margin-right: 40px; margin-bottom: 0px; 
margin-left: 40px;
     }
     /*]]>*/--></style>
</head>
<body>
     <p>The two diagrams below should be identical.</p>
     <div class="test">
         <p id="ruled">X X X X X</p>
         <p id="control"><img src="support/css1test412a.png"
                          alt="" height="40" width="360" /></p>
     </div>
</body>
</html>

Although, I can't quite figure out why you think the diagrams should be 
identical.  The image in the screenshot you sent looks nothing like the 
CSS styled text version.

   Also, you should notice that Opera ignored the CSS because the 
document was being parsed as text/html in Opera, rather than 
application/xhtml+xml as indicated in the information panel on the left. 
   My Opera parsed it as application/xhtml+xml, so I don't know what's 
wrong with your system, it should have also, unless it's an old version. 
  Anyway, by using the <!--/*--><![CDATA[/*><!--*/ and /*]]>*/--> as 
above, the style will be parsed by both HTML and XHTML user agents.

-- 
Lachlan Hunt

http://www.lachy.id.au/
lachlan.hunt@lachy.id.au
Received on Thursday, 22 July 2004 00:22:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:31 GMT