3 replies [Last post]
ljp099
Offline
newbie
Last seen: 15 years 30 weeks ago
Joined: 2004-05-11
Posts: 2
Points: 0

Is there a known bug with some browsers (IE 6 and Mozilla 1.5) not reading the doctype declaration?

I coded a page with this dtd:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

The page displayed correctly in all the users PCs who tested it, except for one. Turns out that the computer (a new Sony Vaio notebook) was not reading the doctype properly. As a result padding was thrown off and the font size of all tabular data was blown up to 16 point. I removed the dtd, recoded the page for IE and Mozilla (in quirks mode - no dtd) and now the page renders the same on all PCs. My question really is how can I be certain that all PCs will render the doctype accordingly? If I cant be certain of this, what I can be certain of is not inserted a dtd, coding all the pages for "quirks" mode. Is this the reality, or is there a way to make certain that the dtd is loaded properly?

thanks,
lance

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 5 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Browser not reading doctype

Hi

Without seeing your full page code, it is difficult to say. Have you by any chance got the xml declaration before the doctype?

But, the Sony is just an XP machine with IE6, yes?

Trevor

ljp099
Offline
newbie
Last seen: 15 years 30 weeks ago
Joined: 2004-05-11
Posts: 2
Points: 0

Browser not reading doctype

the doctype declaration was the first line of code, nothing was above it.

yes, it was a windows xp, IE 6 machine.

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 3 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

Re: Browser not reading doctype

ljp099 wrote:
and the font size of all tabular data was blown up to 16 point.

This looks more like the css file was not being read.

Regards
Day

The only way to learn is to do it yourself