How to change your browser?

How do I make a website that can recognize a browser and change its format accordingly?

  • I have developed a website for a business and it looks fine in Chrome and Firefox, but its off in internet explorer. Its left justified and a slide show that I have embedded isn't appearing. I can fix those problems, but not without ruining the format in the other two browsers. Is there a way I can have my website recognize the browser that is viewing it and change its format to what I have specified for that browser? Or is there a way to at least redirect to a new page that is formatted for that browser?

  • Answer:

    For that you have to add conditional comments to your html. Conditional comments only work in IE, and give special instructions meant only for IE. They are supported from IE 5 onwards. For example: <!--[if IE 6]> Special instructions for IE here <![endif]--> Their basic structure is the same as an HTML comment (<!-- -->). Therefore all other browsers will see them as normal comments and will ignore them entirely. IE, though, has been programmed to recognize the special <!--[if IE]> syntax, resolves the if and parses the content of the conditional comment as if it were normal page content.

kevin at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

In internet explorer you can use if statements in the header to use a specific style sheet. http://www.quirksmode.org/css/condcom.html

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.