-
Css conditionals
Hi,
I have a css file, and I want to have seperate style fore different browsers, like this:
if (opera)
color:red;
if (firefox)
color:black;
if (IE)
color: white;
else
color: green;
How can I do it?
-
-
You'll have to go for the browser specific CSS hacks if you are looking for a CSS only solution. But using CSS hacks is not a good method though the developers use it to troubleshoot some issues in some specific browsers, mostly in IE.
In most of the browsers these kind of CSS hacks can be done. Also most kind of CSS hacks works in a cross-browser manner. Some of the CSS hacks used in Firefox will work correctly in Google Chrome, Apple Safari, etc. Some does not. It will really difficult to identify the unique CSS hack for different browsers.
But the operations that you've mentioned can be done through JS without much trouble though.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks