Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-26 13:03:00

-chris-82
New Member
Registered: 2008-02-18
Posts: 4

browser specific stylesheets?

Is it possible to use browser specific stylesheets? I have tried the standard way, to no avail.

Here is my CSS info:
<txp:css format=“link” />
<!—[if IE ]>
<link rel=“stylesheet” href=”<txp:css n=“iehacks” />
<![endif]—>

Offline

#2 2008-02-26 13:25:18

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: browser specific stylesheets?

Maybe IE needs type=text/css?


Code is topiary

Offline

#3 2008-02-26 13:33:41

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: browser specific stylesheets?

I’m using Ruud’s CSS plug-in but does this work for you:-

<!--[if lte IE 6]>
<txp:css format="link" n="iehacks" media="screen" />
<![endif]-->

This would be for IE6 or lower but you can change that bit.

Last edited by thebombsite (2008-02-26 13:36:49)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2008-02-26 16:33:16

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: browser specific stylesheets?

yup, your tags are not really complete, you’d need

<!—[if IE ]>
<link rel=“stylesheet” href=”<txp:css n=“iehacks” />” type=“text/css” />
<![endif]—>


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#5 2008-02-26 23:42:21

-chris-82
New Member
Registered: 2008-02-18
Posts: 4

Re: browser specific stylesheets?

Awesome, thanks guys!

Offline

#6 2008-09-15 03:58:51

traceyDHL
New Member
Registered: 2008-09-15
Posts: 1

Re: browser specific stylesheets?

Hi there, I’ve just built my first Textpattern site and everything’s working great except my css in IE6. I have created a separate style sheet and put this code on my page, as per the advice above, but nothing changes. Any ideas?

<txp:css format=“link” n=“defaultstyle” />

<!—[if lte IE 6]>
<link rel=“stylesheet” href=”<txp:css n=“ie6” />” type=“text/css” />
<![endif]—>

Offline

#7 2008-09-15 06:15:21

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: browser specific stylesheets?

Take the conditionals out and run it through IE6 – this might determine where the problem is: conditionals or the stylesheet itself.

Also, what I do sometimes, if I’m not sure a stylesheet is being picked up, is make an obvious style change – like a red border around something.

And have a look in the rendered HTML to see what is being presented to the browser, to make sure it looks sensible. Use the “View Source” menu option.

Offline

Board footer

Powered by FluxBB