...

View Full Version : Doctype code...to use or not to use?



Mark Schneider
10-30-2002, 06:19 PM
I've recently discovered that eliminating the...

<!doctype html public "-//w3//dtd html 4.0//en">

...from the top of a webpage allows a CSS effect to display. (Thanks again PlatinumProject)

So the question is, what is the ramification of eliminating this code? What could happen on webpages without this code?

jkd
10-30-2002, 06:36 PM
They are rendered in quirks mode in IE6 and NS6+. This can be disastrous if you have a compliant webpage.

Catman
10-30-2002, 07:24 PM
I haven't noticed any problems like jkd mentions -- and while the so-called strict-mode is far from perfect, at least the rendering is more consistent between IE6 and NS6+ (which reduces the need for browser-specific tweaks).

Bosko
10-30-2002, 09:53 PM
Well,I have.When I create a strict XHTML page it will render okay with the doctype set,but when I remove it (and Mozilla jumps to Quirks mode) it is rendered wrong.

Catman
10-30-2002, 10:07 PM
Okay, I need to read more carefully -- I got things swapped around in my brain and ended up with foot in mouth.

:eek:

jeorg
10-31-2002, 07:58 AM
<code>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
</code>

I it use on all my pages... and no problem with IE n6 and Mozilla

Mark Schneider
10-31-2002, 09:26 AM
It seems like the code...

<code>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
</code>

...does not show color in scrollbars using CSS linked locally or from a remote document.

Mark Schneider
10-31-2002, 09:30 AM
Sorry! I take that back.

Yes, it does show the Css colored scrollbar effect!

It's too late...I'm going to bed!

ronaldb66
10-31-2002, 10:57 AM
Coloured scrollbars?!! Is that part of an official CSS standard, anyway?

MCookie
10-31-2002, 11:22 AM
> > Coloured scrollbars?!! Is that part of an official CSS standard, anyway?
No, it isn't.

> > <?xml version="1.0" encoding="iso-8859-1"?>
Makes Win/IE6 render in quirks mode. Win/IE6 looks for a DTD on the first line of the page.

jeorg
11-01-2002, 08:34 AM
sorry for the <code></code> it works for another forum !

the scrollbar works with IE with or without doctype

body
{
margin:0;
border:0 none;
border-spacing:0;
padding:0;
background-color:#ff0066;
color:#000000;
text-align:center;
vertical-align:top;
font-family:Arial, Helvetica, sans-serif;
font-size:8pt;
font-style:normal;
font-weight:400;
scrollbar-face-color:#ff0066;
scrollbar-shadow-color:#ff0066;
scrollbar-highlight-color:#ff0066;
scrollbar-3dlight-color:#ff0066 ;
scrollbar-darkshadow-color:#ff0066;
scrollbar-track-color:#ff0066;
scrollbar-arrow-color:#000000;
}

Mark Schneider
11-01-2002, 04:14 PM
Thanks all for your input into my silly colored scrollbars.

Though they may not be part of the official W3C or CSS standard, as a designer I'm making a choice to use them because they serve the visual needs of my client, and don't seem to impair functionality. When form and function can live together (at least mostly!) it's a win-win situation.

I realize in theory for many reasons they are not perfect, but in this ridiculously wide and shifting industry, they work for me now.

Just in case anyone is interested, the doctype that seems to work best to support this is...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Of course this was right under my nose, at the top of this very website's code!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum