Forum Moderators: phranque
How necessary is it to have the doctype headers at the top of every webpage...!
when i have this doctype :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Is there any workaround for this...like if having the doctype really does make a difference...then i prefer to have it...possibly both the header and the scrollbar !
Thanks much for any help
Cheers
:)
As to your present situation, a few ideas. Perhaps declaring a different doc type will help, although the one you're presently using seems to be the most "liberal" for V4 browsers. Also, there are numerous sites that list known CSS bugs, such as Rich In Style [richinstyle.com] or WebReview [webreview.com] that may offer some insight.
My guess is that you're using a nonstandard Microsoft extension, which is only available with IE in "quirks mode". And quirks mode is usually activated when the browser doesn't find a valid doctype declaration.
The doctype declaration is not technically necessary (yet), but makes it a lot easier to ensure the same appearance of a page in different browsers. Each browser family and version has its own set of quirks, often conflicting with each other.
Thanks for the replies !
DaveAtIFG :
Thanks for the pointers and explainging the importance of declaring doc types...! I sure want to have them and as well the scroll bars..! I'll look at the pointers, you have given me.
bird :
I am really not sure, if the CSS for my scroll bars I am using is valid or not.. If you should like to take a look at it here it is :
BODY {
scrollbar-face-color:#F2F2F2;
scrollbar-highlight-color:#E0E0E0;
scrollbar-3dlight-color:#E0E0E0;
scrollbar-darkshadow-color:#000000;
scrollbar-shadow-color:#E0E0E0;
scrollbar-arrow-color:#CC0000;
scrollbar-track-color:#D7D7D7;
}
Also, I am not sure, whats quirks's mode of a browser.. could some one pls throw some light on that ??
I have noticed another thing...
Without this part
"http://www.w3.org/TR/html4/loose.dtd"in the Doctype declaration, the scrollbar code which i have mentioned above works...! but with that, the code doesn't work.
I use IE6.0.
Thanks much again
Cheers
:)
it is clear that the URL given is to a version that does not include altering the scrollbars as an option...you either need a link to one that includes it, or to drop the specific URL and rely on luck as to what browsers will default to
Okay here is a sample doctype declaration, the same what i have mentioned before :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
What exactly happens, when i put that on the top of my html pages, i understood the url part of it...i would be interested to know abt the first part of it also...and what exactly is a dtd ??
Thanks again
Cheers
:)
declares the document to be html as opposed to, for instance, xhtml or xml
"-//W3C//DTD HTML 4.01 Transitional//
declares it to use the w3c definitions of html 4.0 Transitional...the version of html 4 that still includes some older tags
EN"
merely declares the document type declaration (NOT the web page) to be in the English language
hopefully these might be useful
[w3.org ]
[htmlhelp.com ]
[gutfeldt.ch ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
The scrollbars may work again. Keep in mind that the shortened DOCTYPE forces the browser into Quirks mode.
Also, the scrollbar properties are not valid CSS according to the W3C. They don't pass validation.