Elements on page are aligned incorrectly after changing Doctype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TimSki
    New Member
    • Jan 2008
    • 83

    Elements on page are aligned incorrectly after changing Doctype

    Hi,

    I've jus added this line to the top of my classic asp page

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">

    now lots of the elements on my page are aligned incorrectly.

    have i done some bad programming or something ?!
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    It is likely that you maybe using old or deprecated elements. Elements like font, center and framesets are not included.

    Try validating your page here W3 Validator

    Comment

    • TimSki
      New Member
      • Jan 2008
      • 83

      #3
      that's great. unforntumately the page is behind a login so the validator always reverts to the login page - is there anyway around this ?

      Comment

      • JKing
        Recognized Expert Top Contributor
        • Jun 2007
        • 1206

        #4
        Not that I know of. If you want you can post the HTML here and we can take a look at it for you. If there is any confidential info be sure to strip that out before posting.

        Edit: A little after thought here, you could always try saving the html to a local file then uploading the local file directly to be validated.

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          The doctype is the set of rules you are telling the browser you are using to create the page. The "Document Type Definition". It's the first thing to go on a page before you do anything else and is NEVER an afterthought. Remove/Add the doctype, you're changing the rules.

          A doctype is required for all modern web pages.

          Comment

          Working...