Previous Message
Next Message

[css-d] XML Declaration & Border widths

Sent by Mihir on 25 January 2002 17:05


A while back I was working on this layout that had an image in the
background with some lines on it, and I wanted to align the menu with a 1
pixel border with the lines at the back, I found out that if I include a 1
pixel border on the right of a div, IE6 will include this border inside the
specified width of the div if the XML declaration is specified. If the XML
declaration is not specified IE6 will render the div with the 1px border
added to the width of the div, just like Netscape 6.2 & Opera 6. Since I was
making the page in XHTML 1.1 I can't remove the XML declaration and yet have
valid code, which is not good because I had a layout that looked exactly the
way I wanted it to look in all there 6x browsers.

Examples: < with the XML declaration < 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?

Previous Message
Next Message

Message thread: