iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-16-2004, 05:50 PM
johreiki's Avatar
WebProWorld Member
 
Join Date: Oct 2003
Location: Hilo, Hawai'i
Posts: 68
johreiki RepRank 0
Default To <!DOCTYPE> or not to <!DOCTYPE>

I've been reading Jeffrey Zeldman's "Designing with Web Standards" and loving what he says about the wisdom of us crawling out of our Neanderthal caves -- designing pages with all the streamlining allowed by current CSS capabilities; designing for "modern" browsers instead of doing all sorts of "illegal" and laborious contortions with HTML in order to trick dinosaur browsers like Netscape 4 into displaying things they way we want them to appear.

He makes such a good case for separating Structural elements from Presentational elements -- confining Structure to HTML and Presentation to CSS....and simply ACCEPTING that our work will not look as good in the dinosaur browsers!

So, feeling totally liberated of the Neanderthal mentality I've been carrying for so long, I started making pages in XHTML, as he recommends in the book. I was loving it, and the pages looked great (in IE6), and they even validated in the W3C validator (I'm sure these are the only pages I've ever made that would even come close to doing that!). And then I noticed that my custom scrollbar had suddenly disappeared, replaced by the default version.

After checking and re-checking all my code and finding nothing out of place, I now discover that custom scrollbars are ILLEGAL in XHTML!!

I was using the <!DOCTYPE> and <html> tags below....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

....and wondered what would happen if I removed the <!DOCTYPE> tag and kept the <html> tag. Guess what - the page displayed properly, even retaining the custom scrollbar.

Then I removed even the reference to XHTML from the <html> tag -- leaving an old-fashioned, basic <html> tag -- and still the page displayed properly, including custom scrollbar!

So, it seems, we CAN do custom scrollbars in XHTML, as long as we don't tell the browser we're using XHTML!

After all this, I have 2 questions:

1) Is there no problem using the basic <html> tag when the page is actually written in XHTML? (Apparently the / to close image tags, etc. is simply ignored by HTML...?)

2) Isn't the <html xmlns="http://www.w3.org/1999/xhtml"> tag, by itself, subjecting the page to the rules of XHTML? (Apparently not, since it allows the custom scrollbar to be displayed...)


Thanks in advance for your wisdom ------

_||_
db
__________________
Don Beckett
Reiki, Johrei, Macrobiotics: POWER TOOLS
http://johreiki.net/
Reply With Quote
  #2 (permalink)  
Old 03-16-2004, 11:14 PM
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: Western Australia
Posts: 1,336
matauri RepRank 0
Default

Are you talking about customizing scroll bars by changing their colour? And when you validated, was it with an external css file? And if so, did you validate the css?

To my knowledge, customized scroll bars arent supported by xhtml, but are also only supported by IE & not other browsers.

My reckoning would be that the XHTML doctype didnt display the customization, whereas the HTML would. But if you had the formatting in a separate css file, then the XHTML page would still validate, even though it wouldnt show the scroll bar.

Have you checked it in other browssers apart from IE? There are many customisations that arent supported from browser to browser,or from HTML to XHTML, hence why there are so many hacks in place to deal with them. The reasoning behind XHTML was to try & make code compatable with all current & future technologies.
__________________
Web Development Community ::: Forum ::: Library

It' time for Progressive Web & IT Development!
Reply With Quote
  #3 (permalink)  
Old 03-16-2004, 11:31 PM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Factor1 Web Design Development Building Maintenance Kelowna, BC</title>
<meta name="Description" content="." /><meta name="Keywords" rsanol" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<link rel="stylesheet" type="text/css" href="mainmik.css" />
<style type="text/css"> p[id] { color: red; }
* html #test-span {
color:green;}

</style>
<!--[if IE]>
<style type="text/css">
html{scrollbar-face-color: #9DAEAE; scrollbar-shadow-color: #FFFFFF; scrollbar-highlight-color: #FAE6E2; scrollbar-3dlight-color: #67717A; scrollbar-darkshadow-color:#AEA19D ; scrollbar-track-color: #E2FAFA; scrollbar-arrow-color:#FB100D}
</style>
<![endif]-->
</head>
Valid XHTML 1.0 strict, beeyoootiful colors on scrollbar LOL
:o)
Reply With Quote
  #4 (permalink)  
Old 03-17-2004, 05:49 AM
johreiki's Avatar
WebProWorld Member
 
Join Date: Oct 2003
Location: Hilo, Hawai'i
Posts: 68
johreiki RepRank 0
Default

Quote:
Originally Posted by Matauri
Are you talking about customizing scroll bars by changing their colour?
#### Yes.

Quote:
Originally Posted by Matauri
And when you validated, was it with an external css file? And if so, did you validate the css?
#### Yes, external css; and No, I didn't validate it.

Quote:
Originally Posted by Matauri
To my knowledge, customized scroll bars arent supported by xhtml, but are also only supported by IE & not other browsers.
#### Yes, I discovered that custom scrollbars are "illegal" (as one author put it) in xhtml. According to that article, they are supported by at least one other browser (I think it was Opera) as well as IE.

Quote:
Originally Posted by Matauri
My reckoning would be that the XHTML doctype didnt display the customization, whereas the HTML would. But if you had the formatting in a separate css file, then the XHTML page would still validate, even though it wouldnt show the scroll bar.
#### Right, that was exactly my experience. And obviously my remote css file would not validate....

Quote:
Originally Posted by Matauri
Have you checked it in other browsers apart from IE?
#### Only Netscape 4 - which will not show a custom scrollbar even if you stand on your head! : ^ )

Quote:
Originally Posted by Matauri
There are many customisations that arent supported from browser to browser,or from HTML to XHTML, hence why there are so many hacks in place to deal with them. The reasoning behind XHTML was to try & make code compatable with all current & future technologies.
#### Yes....and I really appreciate that....but I also like the custom scrollbars - they make the page look so much better!!


Thanks -----
_||_
db
__________________
Don Beckett
Reiki, Johrei, Macrobiotics: POWER TOOLS
http://johreiki.net/
Reply With Quote
  #5 (permalink)  
Old 03-17-2004, 06:12 AM
johreiki's Avatar
WebProWorld Member
 
Join Date: Oct 2003
Location: Hilo, Hawai'i
Posts: 68
johreiki RepRank 0
Default

Quote:
Originally Posted by mikmik
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Factor1 Web Design Development Building Maintenance Kelowna, BC</title>
<meta name="Description" content="." /><meta name="Keywords" rsanol" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<link rel="stylesheet" type="text/css" href="mainmik.css" />
<style type="text/css"> p[id] { color: red; }
* html #test-span {
color:green;}

</style>
<!--[if IE]>
<style type="text/css">
html{scrollbar-face-color: #9DAEAE; scrollbar-shadow-color: #FFFFFF; scrollbar-highlight-color: #FAE6E2; scrollbar-3dlight-color: #67717A; scrollbar-darkshadow-color:#AEA19D ; scrollbar-track-color: #E2FAFA; scrollbar-arrow-color:#FB100D}
</style>
<![endif]-->
</head>
Valid XHTML 1.0 strict, beeyoootiful colors on scrollbar LOL
:o)
WOW -- you are a wizard! A million thanks!! May I ask about some of this code....

<meta name="MSSmartTagsPreventParsing" content="TRUE" /> : What does this do? It sounds like it's preventing someone from parsing the code....

And what is the first <style> tag doing? - <style type="text/css"> p[id] { color: red; }
* html #test-span {
color:green;} </style>


Many thanks ------
_||_
db
__________________
Don Beckett
Reiki, Johrei, Macrobiotics: POWER TOOLS
http://johreiki.net/
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:24 AM.



Search Engine Optimization by vBSEO 3.3.0