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

8 replies
  • WEB DESIGN
  • |
Hello Warriors,

Please help me on how to fix this. This is just a sample one but please view it, Stop Snoring Remedy

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 want the output when viewed in google chrome will be the same when viewed using firefox.

I hope I have stated it very well.

Any help you may provide will be highly appreciated.

Thanks,
#chrome #file #firefox #google #html #viewed
  • Profile picture of the author Caleb Spilchen
    Different interpretations of code.

    Some browsers don't except certain codes for some reason. You sometimes need to have browser specific CSS.
    Signature

    Canadian Expat Living in Medellin, Colombia

    {{ DiscussionBoard.errors[2667097].message }}
  • Profile picture of the author JonAlfredsson
    Sites are different and I agree with the differences when it comes to code interpretation. This is perhaps why some sites would tell you that the site looks better on a certain browser or other versions.
    {{ DiscussionBoard.errors[2667112].message }}
    • Profile picture of the author digitalfiz
      Originally Posted by JonAlfredsson View Post

      Sites are different and I agree with the differences when it comes to code interpretation. This is perhaps why some sites would tell you that the site looks better on a certain browser or other versions.
      I've always considered those "sites looks best in" tags to be the mark of a lazy developer but thats just me. it's not really all that hard to make your site look the same for all browsers there are standards most browsers follow even IE has felt the pain of not following standards and is fixing up its game. The biggest thing that is still a problem is people using browser specific code without providing simple alternatives that other browsers more then likely have.

      Just remember keep it standard and all should be fine. The html/xhtml/css standards the browsers use can be found at World Wide Web Consortium (W3C)

      Also by standard I by no means mean dull or simple I mean follow the standards and you can have a beautiful website that looks the same across all browsers. If you can't code yourself make sure to use a WYSIWYG editor that only uses w3c compliant code and you should be good.
      Signature
      My Blog | PHP is my Kung Fu!
      {{ DiscussionBoard.errors[2667150].message }}
  • Profile picture of the author digitalfiz
    Firefox uses the gecko rendering engine and chrome uses webkit so they render things different specially if the code is not standardized. You can always check your code at The W3C Markup Validation Service to see if it validates. Chances are it wont if you created it in a WYSIWYG editor because they are often times sloppy but if you can remove most of the errors or all of them your html should look very similar in all browsers. Well with the exception of IE usually you have to make IE specific changes to your code if its code that is a little more complicated.
    Signature
    My Blog | PHP is my Kung Fu!
    {{ DiscussionBoard.errors[2667122].message }}
  • Profile picture of the author SteveJohnson
    ESPECIALLY when you have coding errors, which this page does. Most modern browsers handle well-formed html approximately the same, but radically different when they encounter errors.

    Run your HTML through a validator. Just google for 'html validator'.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[2667131].message }}
  • Profile picture of the author Gary King
    As the others suggested, having valid code is a very important place to start...

    That said, it's NOT a guarantee...

    Browsers interpret those html codes (valid or otherwise) differently. Internet Explorer 6 (yes, it's still in use) interprets things dramatically differently than current versions of IE or FF/Chrome for example.

    Best to test as much as you can. Barring that, valid code is the best place to start.
    Signature

    ===========================
    OFFLINERS! Warning: Unless You Know These Pricing Secrets, You are Leaving THOUSANDS on the Table. Get Your Free Report Now.
    {{ DiscussionBoard.errors[2667619].message }}
  • Profile picture of the author magiclouie
    Thanks a lot guys for your suggestions. I will do my best to get it sorted out with the help of your replies.
    {{ DiscussionBoard.errors[2669250].message }}

Trending Topics