How to use <!--[if IE 6]>

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
louisk
Forum Members
Forum Members
Posts: 89
Joined: Wed May 30, 2007 7:40 pm

How to use <!--[if IE 6]>

Post by louisk »

HI, Im wondering if some one can help me figure out this problem.
In stead of using css-hacks inside the css files, I would like to use this method.
But how to do this since you call all css files through {stylesheet}?

An option would to have stylesheet groups: {stylesheet group="IE"} and {stylesheet group="FF"} of what ever.

Hope someone can help.
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm

Re: How to use <!--[if IE 6]>

Post by scooper »

Not that I've used it myself yet (don't you love posts that start that way), but the Static Stylesheet module lets you specify specific stylesheets within a template.

http://dev.cmsmadesimple.org/projects/static-css/

s.
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm

Re: How to use <!--[if IE 6]>

Post by scooper »

and now I'm replying to myself.... top forum behaviour here.

Right. I have tried it now and it works a treat.

Grab the the static_stylesheet tag (it's not actually a module) and pop it into your 'plugins' directory.
Create a directory called 'stylesheet' in the root of your installataion and chmod it 777.
Create a stylesheet with IE6 spefic styles in - let's call it stupidIE
Add the static_stylesheet tag into your template and wrap it in the IE conditional tags so:


{static_stylesheet name=stupidIE}


You can still use the normal {stylesheet} tags (best put it before the conditional) as normal.
louisk
Forum Members
Forum Members
Posts: 89
Joined: Wed May 30, 2007 7:40 pm

Re: How to use <!--[if IE 6]>

Post by louisk »

Okay, thanks for your reply. I's a neat way to do it, however, now I cant edit it in the cms.
Maybe I can make a global content block and import it as a style sheet... would that work?
The neat thing however is to have it in your stylesheet area in the cms.
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm

Re: How to use <!--[if IE 6]>

Post by scooper »

you can still use the CMS to edit everything. Just create a stylesheet as you would normally but don't attach it to a template.

Calling static_stylesheet will the pull it from the database and cache  it for you - no need to mess around with uploading your own css files.
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am

Re: How to use <!--[if IE 6]>

Post by pixelita »

I'm a bit lost. I downloaded the plugin, created the IE6 specific stylesheet, did NOT link it to any template, and yep, it shows up in the /stylesheet directory, but I cannot figure out WHERE to put it in the template to make it work.

Above the main stylesheet tag {stylesheet}? Inside {literal} tags? Neither seems to work. 
Submit your site to the We Love CMSMS showcase
oliverg

Re: How to use <!--[if IE 6]>

Post by oliverg »

When I update the stylesheet from inside CMS it doesn't actually update in the /stylesheet/ directory on the server, even when the page is reloaded.

Edit: I am able to delete the file and have CMS put the updated one in it's place, could possibly be something to do with permissions not recursing correctly or the script simply being unable to overwrite pre-existing files.
Last edited by oliverg on Tue May 06, 2008 1:39 am, edited 1 time in total.
Post Reply

Return to “Layout and Design (CSS & HTML)”