Forum Moderators: phranque

Message Too Old, No Replies

ScrollBars and Doctype headers...?

doesn't work ?

         

ideavirus

4:02 am on Jul 12, 2002 (gmt 0)

10+ Year Member



Hii !

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">

...My scroll bars doesn't work ..i mean the css ones...i had noticed the same a couple of times before also....! But without the doctype header...the colored scrollbars work

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
:)

DaveAtIFG

10:14 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Most modern browsers make a pretty fair guess at a doc type if it's undeclared and they usually do a pretty good job of rendering the page. But it IS a W3C standard and, as more standards evolve, I fully expect the doc type declaration to become more important. It's probably a bad idea to make a habit of not using it.

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.

bird

10:33 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you sure that your scrollbar magic is valid CSS?

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.

ideavirus

1:41 pm on Jul 15, 2002 (gmt 0)

10+ Year Member



Hii,

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
:)

Eric_Jarvis

1:55 pm on Jul 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the URL is for the specific document that details the version of html your DTD claims the site uses

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

ideavirus

3:31 pm on Jul 15, 2002 (gmt 0)

10+ Year Member



Eric_Jarvis : Your reply helped me in understanding what exactly is happening with that url mentioned.I didn't know that before. :(

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
:)

Eric_Jarvis

3:57 pm on Jul 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



in short
<!DOCTYPE HTML PUBLIC

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 ]

pageoneresults

4:12 pm on Jul 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you shorten your DOCTYPE to this...

<!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.

ideavirus

4:47 pm on Jul 15, 2002 (gmt 0)

10+ Year Member



Thanks again for the detailed explaination...!
I am checking the pointers you had given me,Eric_Jarvis..!

Does passing the W3C Validation has any advantages in terms of SEO or otherwise ??

Thanks
Cheers
:)