Previous Message
Next Message

Re: [css-d] XML Declaration & Border widths

Sent by Chris Cassell on 26 January 2002 12:12


At 05:15 PM 1/25/02, Mihir wrote:
>http://www.riffola.com/quirk/index.html < with the XML declaration
>http://www.riffola.com/quirk/sansxml.html < without the XML declaration
>
>You will see that in the first one Netscape 6.2, and Opera 6 align the
>borders with the lines on the background image, while IE6 doesn't. On the
>page without the XML declaration, all three browsers align the borders with
>the lines on the background image.
>
>My question is which browser gets it right? and If this is a bug in IE6, why
>is it working perfectly in quirk mode?

Mihir, IE6 actually goes back into quirks mode when you include the XML 
declaration, even with a standards-mode-triggering doctype, because it 
wants the doctype to be the first thing in the document. The work-around to 
this is to leave out the XML declaration, and include the character set in 
a meta tag:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

This will allow your page to validate without the XML declaration and puts 
IE6 in standards mode, so that the border is added outside the box.

See this page in regards to triggering standards/ quirks modes in IE6: 
(sorry if it wraps)
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp>

Chris


====================================
http://www.chriscassell.net
Previous Message
Next Message

Message thread: