How to set browser compatibility

I have developed an html file. It works great in IE6 and IE7. When I run the same html file in IE8, the design is not the same and the Javascript is not working correctly. Does it show the Browser View Compatibility?

How to fix it?

-3


a source to share


3 answers


It is difficult to truly help you because you are not giving us enough information. Your question is very broad in the sense that getting your website to display the same in all browsers is a lot of work, and the reasons why a particular layout doesn't work in a particular browser are almost endless.

A few important things to help you get started on your journey:



  • Use DOCTYPE or you will throw browsers into quirks mode.
  • Reset your CSS so you can apply the styles you want to use on the elements.
  • Using the Javascript Library - the popular part of these parts is jQuery and I personally recommend it. However, it doesn't really matter who you go with as long as you use it. Many smart guys have spent many hours taking care of all the incompatibilities between browsers. Trying to make a lot of dynamic content on your site with pure Javascript borders on masochist.

Once I started doing these things, making my site work the same across browsers became much easier.

+4


a source


Let this read, it details what causes IE8 to switch to compatibility mode and how to fix them.



http://blogs.msdn.com/ie/archive/2009/03/12/site-compatibility-and-ie8.aspx

+1


a source


You should give us some sample codes (or even a working site) and do something like:

  • Website validation (html markup, css and javascript)
  • Check it out on another modern browser (opera, firefox, chrome, safari, etc.).
  • Do you adhere to the web standard when creating web pages?
  • Do you rely on CSS hacks?
  • Did you know that the Trident rendering engine on IE6 and IE7 didn't even pass the ACID 2 test? which mean a lot of CSS implementation problems ...

Then we could help you

0


a source







All Articles