Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Oct 2002
    Location
    Kirkland, Washington
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Doctype code...to use or not to use?

    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?

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    They are rendered in quirks mode in IE6 and NS6+. This can be disastrous if you have a compliant webpage.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ames, IA, USA
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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).
    Need more emoticons?
    Visit Catman's Private Stock

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Netherlands
    Posts
    217
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ames, IA, USA
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, I need to read more carefully -- I got things swapped around in my brain and ended up with foot in mouth.

    Need more emoticons?
    Visit Catman's Private Stock

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    doc

    <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

  • #7
    New Coder
    Join Date
    Oct 2002
    Location
    Kirkland, Washington
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #8
    New Coder
    Join Date
    Oct 2002
    Location
    Kirkland, Washington
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry! I take that back.

    Yes, it does show the Css colored scrollbar effect!

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

  • #9
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Coloured scrollbars?!! Is that part of an official CSS standard, anyway?
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #10
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    > > 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.

  • #11
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    <code>

    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;
    }

  • #12
    New Coder
    Join Date
    Oct 2002
    Location
    Kirkland, Washington
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •