www.webdeveloper.com
Results 1 to 11 of 11

Thread: DOCTYPE causing problems

  1. #1
    Join Date
    Dec 2005
    Location
    Preston, Lancs, England
    Posts
    13

    DOCTYPE causing problems

    When I add the following DOCTYPE text to my web page a portion of the graphics on the page disapears.

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

    If I delete the top line I have no problem with the page display.

    Why is that?

    Thanks for your help

    Dave

  2. #2
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,773

  3. #3
    Join Date
    Dec 2002
    Location
    Seattle, WA
    Posts
    1,843
    in IE and NN, if there is no DTD (DOCTYPE) defined the browser goes into "quirks" mode, if the DTD is present, the browser goes into "standards" mode

    post your code

    use the validation links in my signature

  4. #4
    Join Date
    Dec 2005
    Location
    Preston, Lancs, England
    Posts
    13
    Hi,
    I found that if I add an extra <! at the start of the line it is O.K. So will go with that for time being.

    Dave

  5. #5
    Join Date
    May 2005
    Posts
    2,040
    I found that if I add an extra <! at the start of the line it is O.K. So will go with that for time being.

    Put this in, too. @#$^&%&*(^&(*&)

  6. #6
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,408
    Quote Originally Posted by DaveJW
    Hi,
    I found that if I add an extra <! at the start of the line it is O.K. So will go with that for time being.

    Dave
    If you're going to do that, then you might as well just take the doctype declaration out completely, since I'm sure all you're doing now is specifying an invalid doctype.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  7. #7
    Join Date
    May 2005
    Posts
    2,040

  8. #8
    Join Date
    Oct 2005
    Location
    Gold Coast, Australia
    Posts
    2,115
    Quote Originally Posted by DaveJW
    Hi,
    I found that if I add an extra <! at the start of the line it is O.K. So will go with that for time being.

    Dave
    If it's causing that much trouble just eliminate it by removing the Doctype all together.

  9. #9
    Join Date
    May 2005
    Posts
    2,040

  10. #10
    Join Date
    Dec 2005
    Location
    Preston, Lancs, England
    Posts
    13
    Sorry folks! but still not sure what to do with this.
    Obviously if I don't include a Doctype it won't validate.

  11. #11
    Join Date
    May 2005
    Posts
    2,040
    Without code, or preferably a link, we can't help you. Use a strict doctype, not loose. Validate and see what the errors are. Post them here if you need help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles