Jump to content

Define CSS for IE only


doaner6

Recommended Posts

Is there a way I can define certain styles to display in IE and certain styles to display in other browsers (FF, Safari, Opera...)?

Link to comment
Share on other sites

  • 1 month later...
Is there a way I can define certain styles to display in IE and certain styles to display in other browsers (FF, Safari, Opera...)?
Do you have access to PHP?
Link to comment
Share on other sites

...you should try to make it so you don't have to do so.
Impossible.As long as IE exists there will always be a reason to use Conditional Comments to work around IE's faults.Now, go to this link and you'll see how easy it is to use Conditional Comments together with just one CSS file EXTREMELY easy and clever: http://www.positioniseverything.net/articles/cc-plus.html
Link to comment
Share on other sites

It's not impossible to avoid conditional comments. Conditional comments are only necessary if you're trying to fix an already made design. If you're making a new one, you usually can adapt it to work with Internet Explorer. I've never had trouble with it.

Link to comment
Share on other sites

Using Conditional Comments is perfectly fine, they are there for building web applications/sites and it's another of the many tools Web Designers and Programmers have.In other words, there's nothing wrong or improper, at all, with using Conditional Comments. It doesn't make you a 'Guru' if you don't use them, and it doesn't make you a 'newbee' if you do. Again, at all.You can clearly see how simple and clever the use of Conditional Comments is done in the link I provided above. Using Conditional Comments the way they explain it there has made my web design experience WAY more efficient and fun (I can make ANYTHING work in ANY version of IE), tenfold. I think that that method can also improve someone else's web design/development efficiency too like it did to me.

Link to comment
Share on other sites

I don't say it's wrong to use them, I just only use them if I have no other choice. It's a personal preference. If I can save having to put more than one style declaration on my site I will.

Link to comment
Share on other sites

If I can save having to put more than one style declaration on my site I will.
Me too, but we don't live in a perfect world, hence, there's IE6/7, Opera, Firefox, Safari, Konkeror, Lynx...
Link to comment
Share on other sites

@Ricardo ZeaNo one said there was anything "nothing wrong or improper" with using conditional CSS statements. Ingolme is simply pointing out that there are situations that make it possible to avoid having to use them. Lets try not to get too defensive with the statements we make.On a aide note, I've been developing web applications (static and dynamic) for more than 10 years and I've NEVER used CSS conditional statements. And I've only used server side scripting to sniff the browser on only a couple sights where I've had to force something to happen.The point is, it is much, much more likely a developer can avoid using comments than for a developer be forced to use them. Many folks choose to use them because they might be very familiar with how to manipulate the CSS while others might choose other avenues to accommodate the design.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...