Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2008, 11:32 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default CSS scroll bar code hijacked by <!DOCTYPE tag

Hopefully this is the correct place for this post. I have been pulling my hair out identifying why some CSS code I have used SO MANY times is failing on my own new web site.

After stripping the back page bit by bit by bit trying to find out why the scroll bar style was failing I have 100% identified the DOCTYPE tag as the problem. After reading this info (seems like a very good link):

http://www.alistapart.com/articles/doctype/

I went with:

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

However if you click on the link in my signature you will see the style for the scrollbar is being ingnored. To demonstrate this I have uploaded the following page:

www.elitemarquees.com.au/template.asp

which is a exact copy of the about us page without the DCOTYPE tag. The scroll bar style woks as expected. Any ideas how to get around this?

TYIA

Wind is your friend
Matt
www.elitemarquees.com.au
__________________
Wind is your friend
Matt
 
Old January 17th, 2008, 02:13 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Have yu fixed this? The two pages look the same here in the two browsers I tried, IE6 and FF.

Since many years now browsers have two rendering modes, called Standards (AKA Strict) and Quirks Mode. The doctype is used a s trigger for these modes. No doctype at all will guarantee you get Quirks Mode, something you usually don't want. When using this, browsers emulate older, more buggy versions of themselves, which means more differences between browsers.

http://hsivonen.iki.fi/doctype/

--
http://yupapa.com
 
Old January 17th, 2008, 02:17 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Hi there - now I havnt fixed it. All pages except for the:

www.elitemarquees.com.au/template.asp

page have the default scroll bar style. They are very different. I am runing IE 6.0 also

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old January 17th, 2008, 02:22 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Cheers for the link it looks very comprehensive.

I know some kind of DCOTYPE tag should be in place however the one I am using is making the scroll bar style fail. As mentioned the template.asp page used shades of grays (as it should) and the the rest are default blue (when using XP of course)

The failing style from my CSS file is:
body {font-family: verdana,arial,helvetica,palatino,sans-serif;font-size: 11px;color: #000000;
                     scrollbar-TRACK-color: #ffffff;
                     scrollbar-FACE-color: #eeeeee;
                     scrollbar-HIGHLIGHT-color: #999999;
                     scrollbar-SHADOW-color: #999999;
                     scrollbar-DARKSHADOW-color: #ffffff;
                     scrollbar-3DLIGHT-color: #ffffff;
                     scrollbar-ARROW-color: #999999;}


Its time to go home in Aussie now, Cheers for your time, have a good day...

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old January 17th, 2008, 02:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Sorry, I didn't notice the problem was the scrollbar color.

Still, it happens because of what I said. When in Standards Mode MSIE recognize HTML as the root element, so you have to use the scrollbar code with HTML instead of BODY as the selector.

--
http://yupapa.com
 
Old January 17th, 2008, 06:06 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I see, how is this done?

Wind is your friend
Matt
www.elitemarquees.com.au





Similar Threads
Thread Thread Starter Forum Replies Last Post
<!DOCTYPE> Tags? kennethjaysone HTML Code Clinic 0 May 18th, 2007 01:39 AM
Why to use <!Doctype...? rupen HTML Code Clinic 2 October 25th, 2005 04:55 AM
CSS Scroll bar in IE not working BobbyFisher CSS Cascading Style Sheets 2 April 18th, 2005 05:34 PM
css and scroll bar markhardiman HTML Code Clinic 3 July 18th, 2003 04:55 AM
Scroll Bar cooldude87801 BOOK: Beginning Java 2 0 June 18th, 2003 11:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.