Jump to content

How To Detect Browser Version And Change The Layout To Each Browser Atuomaticly?


sunicani
 Share

Recommended Posts

cause different browsers would give various layout even with unique layout code!how can I fulfill the same layout effect via JS to detect browser's version and fit to each of them automatically?thanks, mate

Link to comment
Share on other sites

Professional web developers make layouts that are designed to work on all browsers.Those who don't know enough about HTML and CSS rely on browser switching, which, of course, has its disadvantages.If you really want to do things the easy way, use navigator.appName to detect the browsers; however, the easiest way is not always the best.

Link to comment
Share on other sites

I want to support Ingolme's answer on this one. If you use a strict doctype and write 100% standards-compliant HTML you will achieve most of your goal. The rest can be achieved through experience, by comparing the small differences that remain in each browser and tweaking your code in response. You can still end up with compliant code, but there is more than one way to do things correctly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...