« Under the Dutch Clouds   |   Main index   |  Questioning Extreme Programming; ISBN: 0201844575 »

Ooh you dangerous !DOCTYPE

July 29, 2003 | Comments (0)

While starting to change my site form table based layout to css based layout I first got into problems with the DOCTYPE. IE6 doesn’t render it exactly as Mozilla 1.4 does. My sidebar used the complete width of the page and IE assumed to start the next div for my main content under my sidebar. Fudging a bit with the DOCTYPE kind of solved it.

As you see, I use the banner, sidebar, content, footer kind of layout like numerous sites. This is very easy using a table. Changing it using div for the page border, banner, sidebar content and footer kind of brought me into problems with IE6. Below are the problems I got

IE 6 screenshot rendered ok (7Kb)IE 6 screenshot rendered NOT ok (7Kb)

I had doctype defined as <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”> and going to <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> solved the problem for IE6 and Mozilla 1.4 and Opera waere still happy with it. Bu tthis still didn’t make me happy as it was weird that other sites seemed to get away with it. And today I found out that a simple <?xml version=”1.0” encoding=”UTF-8”?> makes IE6 happy!

Opera 7 screenshot rendered ok (7Kb)Mozilla 1.4 screenshot rendered ok (7Kb)

As 80% of my users have ie (60% version 6, 7% version 5.5) that browser is my biggest worry. But as I’m also a happy user of Netscape for years I want to have things right with the latest Gecko also and downloaded Opera 7 to have a look with this browser. I do not have access to safari as this browser is also used a fair bit on my site; its around 7%! As safari is based on KDE I might have a look at Konqueror later as that is supplied with an easy installable Knoppix distribution (linux).

To make a long story short: “I do not know enough about doctypes, requirements for each type, browser differences, browser hacks etc…”



Although Safari is based on KHTML it's not always the same. Safari is trying to immitate (or is comatible with) the behaviour of Mozilla. Which can be found in http://mozilla.org/docs/web-developer/quirks/doctypes.html or http://devedge.netscape.com/viewsource/2002/almost-standards/

I hope you will know more about doctypes. And ow, by the way: This information only costs a few eurocents or the use of Mozilla for your daily web and mail processing... :-p

Posted by: :) Little Penguin at July 31, 2003 2:09 AM

Post a comment

Use the form below to add your relevant comments, suggestions. Be aware that I reserve the right to edit any raw language, abusive and/or inappropriate comments that's too far off topic or remove it all together.

Line breaks and paragraphs are inserted by default; the following html tags are allowed: a href, b, br/, p, strong, em, ul, li, and blockquote. It is Gravatar enabled!