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
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:
- How do i make a my yahoo but not a home page?Best solution by Yahoo! Answers
- How do I start a website?Best solution by Yahoo! Answers
- How do I make a CV to apply for a job?Best solution by wikihow.com
- How can I make a website like facebook for free?Best solution by eHow old
- How do I make a review website?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.