Why is it that the html file looks different when viewed in firefox and google chrome

Discussion in 'HTML & Website Design' started by magiclouie, Sep 30, 2010.

  1. #1
    Hello guys,

    Please help me on how to fix this. This is just a sample one but please view it, http://www.stopsnoring-remedy.com/home/

    I have spent some time already on sorting this out. I wonder why the file looks different when viewed in firefox and google chrome. It looks perfect when viewed using google chrome. It follows the codes. It has the correct spacing. The title heading has the right space from the top of the site. But in firefox, the title heading is too low from the top.

    I hope I have stated it very well.

    Any help you may provide will be highly appreciated.

    Thanks,
     
    magiclouie, Sep 30, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    You are missing a doctype. Add this to your first line:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    Then see where we stand.
     
    drhowarddrfine, Sep 30, 2010 IP
  3. magiclouie

    magiclouie Active Member

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Hello drhowarddrfineg, I inserted that line and the html flle became damage.
     
    magiclouie, Sep 30, 2010 IP
  4. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #4
    You mean it doesn't work like it used to. All modern web pages are required to use a doctype to be in 'standards mode' as opposed to 'quirks mode'. By adding the doctype, you are changing the rules the browser renders the page with -- in standards mode where you want to be. You created the page in 'quirks' and that's why things changed but you do not want your page to be in quirks.

    iow, rewrite your CSS to work with modern standards.
     
    drhowarddrfine, Sep 30, 2010 IP