Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Target IE with CSS?
How do i target different versions of IE with my css?
I dont like hacks and i want to use conditional comments or something of that nature but when i add the conditional comment with the css rule inside it nothing changes.
having some problems with a margin in IE per usual. groans
wish everybody was on firefox…
www.digitalskraps.com
Offline
Re: Target IE with CSS?
box model hack might be of help.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Target IE with CSS?
Unless you need to specifically target version 5 and earlier browsers (very little need in year 2008) you can do everything with conditional comments. They are safe and do work. If they are not working for you I recommend trying out simple test pages and seeing what is wrong with your code.
The box model and other hacks should not be used since they uglify your code, make maintenance difficult, encourage errors and might trigger unknown side-effects in browsers you are not testing with. As new browsers (like IE7) are introduced you will have to revisit all your old code to fix newfound incompatibilities. This is a nightmare.
If you practice “safe styling” you should not have to put much CSS in a separate IE CSS file… but there are always cases where some helps.
robin
Offline
Re: Target IE with CSS?
Double-check the URL of the IE-specific CSS and ensure it’s being loaded last.
Offline
Pages: 1