cclloyd9785 Posted October 9, 2011 Share Posted October 9, 2011 Is it possible that if a user has a certain browser (Like IE), it would apply a certain set of CSS instead of the normal, or apply extra ones that it wouldn't to other browsers? Link to comment Share on other sites More sharing options...
Don E Posted October 9, 2011 Share Posted October 9, 2011 Yes known as conditional comments. However, conditional comments from what I understand only work in IE. They are supported from IE5 and onwards. <!--[if IE 6]>Special instructions for IE 6 here<![endif]--> http://www.quirksmode.org/css/condcom.html Link to comment Share on other sites More sharing options...
cclloyd9785 Posted October 9, 2011 Author Share Posted October 9, 2011 Is it possible to do the same for firefox too? And I can just remove the 6 for all IE right? And for the CSS, would I just have to put it in a <style> tag? Link to comment Share on other sites More sharing options...
Don E Posted October 9, 2011 Share Posted October 9, 2011 According to what I understand, no, can't for firefox. Yes for all IE just remove the 6. For CSS, yes just put in a style tag or external style sheet: <!--[if IE 6]><style type="text/css"CSS here</style><![endif]--> OR <!--[if IE 6]><link rel="stylesheet" type="text/css" href="mystyle.css" /><![endif]--> Link to comment Share on other sites More sharing options...
Ingolme Posted October 9, 2011 Share Posted October 9, 2011 Why would you want to change something specifically for Firefox? Conditional comments are OK when dealing with browsers that aren't standards compliant, but I discourage the use of anything that singles out specific browsers because it can cause trouble when browsers change. Internet Explorer is the only exception. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.