Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-24 07:52:30

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

conditional comments?

Hi there,

I want to give some css just to IE using conditional comments, like so:
<code><link rel=“stylesheet” href=“styles.css” type=“text/css” />
<!—[if lt IE 6]>
<link rel=“stylesheet” href=“iestyles.css” type=“text/css” />
<![endif]—></code>

How do i do this in the textpattern setup. I am, of course, currently using this to linkto my style sheet:
<code><link rel=“stylesheet” href=”<txp:css />” type=“text/css” media=“screen” /></code>

Any ideas?

EDIT: Im not posting these messages twice but it seems two posts show. It happened yesterday also.

Last edited by elduderino (Today 07:51:38)

Last edited by elduderino (2006-09-24 07:53:08)

Offline

#2 2006-09-24 08:09:21

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: conditional comments?

This is pretty easy to do. Just create a new stylesheet from Textpattern for IE to use (for this example, say it is named “ie”), and add to your page template:

<!--[if lt IE 6]>
<link rel="stylesheet"  type="text/css" media="screen" href="<txp:css n="ie" />" />
<![endif]-->

As to the double-posting, just ignore it. :)

Offline

#3 2006-09-24 11:30:45

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: conditional comments?

Hi Mary,

Thats great, thanks! Sorry should have known i ought to have posted in this forum1

Thanks again

Offline

Board footer

Powered by FluxBB