waggawagga@live.ca Posted July 12, 2011 Share Posted July 12, 2011 Hi folks, I built my website just viewing it in firefox, now upon checking it in IE and safari, I have found some glaring issues. I think I can create a separate external style sheet for each problem browser, but don't know the HTML head code to refer it to the appropriate external style sheet....is that even possible? For example, is it possible to have code in the "head" to send the user to another css if he/she was using IE9 etc? Thanks Link to comment Share on other sites More sharing options...
ShadowMage Posted July 12, 2011 Share Posted July 12, 2011 It's possible with JavaScript for any browser. IE has the ability to use conditional comments (Google 'IE conditional comments' for examples).However,It is not recommended to use browser sniffing in most cases (there are a few rare cases where it is acceptable, though). Post some code and explain what/where the issues are. Chances are they can be fixed without the use of browser sniffing. Link to comment Share on other sites More sharing options...
jeffman Posted July 12, 2011 Share Posted July 12, 2011 There is almost always a cross-browser solution. Sometimes it means rethinking the HTML as well as the CSS, like wrapping plain text in a <p> element or something. Link to comment Share on other sites More sharing options...
whh-kevinw Posted July 13, 2011 Share Posted July 13, 2011 Since all the major browsers read HTML/XHTML without any issues (my sites work fine in all the browsers with no browser-specific modifications), you may be able to make a small change in your code to make the pages compatible across all browsers. If you could copy and paste the code that is not showing correctly in one of the browsers, that would be great. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.