Adding Doctype F*cks Everything

Discussion in 'HTML & Website Design' started by jooles, Aug 21, 2007.

  1. #1
    I'm trying to get my site W3 validated, but one thing I noticed is when I add the doctype tag, the whole design goes to hell. Why is this happening?
     
    jooles, Aug 21, 2007 IP
  2. detz

    detz Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You're adding the wrong doctype.
     
    detz, Aug 21, 2007 IP
  3. Naruto07

    Naruto07 Banned

    Messages:
    32
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    haha i had a similar problem to.

    what doctype are you using?
     
    Naruto07, Aug 21, 2007 IP
  4. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #4
    Because you coded the site in (shit-mode) excuse me quirks mode. To get consistency in all browsers you NEED to use a DTD such as HTML 4.01 Strict or XHTML 1.0 Transitional.
     
    soulscratch, Aug 21, 2007 IP
  5. wyrd33

    wyrd33 Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Be sure you're using the right doctype. Here's an article:
    alistapart.com/stories/doctype/

    Also be sure your web site validates:
    validator.w3c.org
     
    wyrd33, Aug 22, 2007 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #6
    First off, you were designing your site in quirks mode, meaning that the browsers had to guess how you wanted the page to be presented to the user. BAD IDEA.

    Second, I'm going to presume that you were designing for a browser, rather than to the specifications. I prefer a browser-agnostic approach, testing each section of the Web page in Internet Explorer 6/7, Firefox, Opera and Safari as I go along, rather than waiting until I'm done to test. Doing so allows me to catch a lot of errors that would be difficult to fix without resorting to hacks if I were to wait until the end and/or code to one browser and hack for the others.
     
    Dan Schulz, Aug 22, 2007 IP
  7. wyrd33

    wyrd33 Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Awesome advice. :cool:
     
    wyrd33, Aug 23, 2007 IP