I want to add a stylesheet using conditional comments because my theme is messed up in IE. I added ie.css in the Stylesheets group to act as the IE stylesheet. How would I enter it in HTML using conditional comments? Or would I have to manually insert a stylesheet by FTP and link to that?
<[if ie]>
... Include your CSS stylesheet here...
<[/if]>
Should work.
(2009-02-08, 10:48 PM)TomL Wrote: [ -> ]<[if ie]>
... Include your CSS stylesheet here...
<[/if]>
Should work.
I know how to use conditional comments but I want to know how to get the link to the stylesheet. Because it's entered in dynamically, I don't know how to do that without editing global.php.
(2009-02-08, 10:57 PM)computergeek67 Wrote: [ -> ] (2009-02-08, 10:48 PM)TomL Wrote: [ -> ]<[if ie]>
... Include your CSS stylesheet here...
<[/if]>
Should work.
I know how to use conditional comments but I want to know how to get the link to the stylesheet. Because it's entered in dynamically, I don't know how to do that without editing global.php.
Try this:
Go to: 'Admin CP-> Templates & Style-> Theme-> (Your theme) -> global.css'.
Add an enter at the beginning of line 1 so that you get another line above it and note the theme number in the URL at the top of the browser.
Example:
http://forum.kronosandoranos.co.cc/admin/index.php?module=style/themes&action=edit_stylesheet&file=global.css&tid=[b]2[/b]
The part in bold is your theme number.
Then, put in the conditional comments before anything else:
[code]
<[if ie]>
@import "./cache/themes/theme*/ie.css";
<[/if]>
Replace the '*' with your theme number.
Click Save and it should work.
Jlong1
Thank you, jlong1! It works.