Jump to content

Doctype


Munchkin237
 Share

Recommended Posts

Okay... I just realised its when I put the url in it... like:

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

but it works fine when I put:

<!doctype html PUBLIC "-//W3C//DTD html 4.01 Transitional//EN">

Does anyone know if I will have to restructure the whole of my site if I use the first option, or is there some easy fix? Should I just use the second?Thanks

Link to comment
Share on other sites

Because without a DTD, your browser goes into Quriks mode, and with it, it goes into Standards mode. Quirks mode was how IE5.5 and below behaved, and the way other old browsers implemented the CSS spec so that the web pages would work. Standards mode is what we use now for IE6 and above. In this mode, browsers do their best to render the page accoding to the spec. It seems you were somehow coding the page wrong.Following the IE's box model instead of the W3C box model is the most likely reason for your troubles.

Link to comment
Share on other sites

Well, have you tried viewing your site without the doctype in other browsers? If it works fine in all browsers withotu the doctype, then you can leave in Quirks mode, however as each browser has different quirks your site may look good in say IE, and bad in all the others. Then you will have to fix it (and apply the new doctype).

Link to comment
Share on other sites

Okay.. well, I tried it in firefox and it was totally screwed up.. so I've been trying to fix that by editing my css. I've got so far and now its nearly right in IE apart from my drop down menus come out huge for some reason... any ideas why?Also, in firefox... the whole content of the pag doesn't load..and the menu is a bit screwy too.http://myweb.tiscali.co.uk/hempnallpc/ .... see?Just like to point out, I haven't actually started trying to sort of the other pages of the site, only the homepage so ignore those for the time being :)Can anyone give me any tips?Thanks

Link to comment
Share on other sites

You will have better success coding for FF or Opera and then Hacking to suit IE instead of the method you are using to get it correct in IE and then modifying the page for other Browsers.I suggest you strip all of the content out of the page (including the menu) and develop the Template so that a blank page works, then adding back the Menu. Look over at cssplay.co.uk to see several drop-down menus that do not depend on javascript (pure css drop-downs).Then add the core content, etc.Keep the doctype, too.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...