Not Solved Adding a stylesheet
#1
Not Solved
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?
Reply
#2
Not Solved
<[if ie]>
... Include your CSS stylesheet here...
<[/if]>
Should work.
Reply
#3
Not Solved
(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.
Reply
#4
Not Solved
(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
Reply
#5
Not Solved
Thank you, jlong1! It works.
Reply
#6
Not Solved
(2009-02-12, 01:27 AM)computergeek67 Wrote: Thank you, jlong1! It works.

No problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)