About conditional css

webactor

Avatar: webactor

2008-11-05 09:10

Hi there

- how and where can i insert a conditional css line in Quick.CMS ?
I tryid with this in my container.tpl file

<!--[if IE]>
<style type="text/css">@import "$config[dir_templates]ie7.css";</style>
<![endif]-->

Just above
<style type="text/css">@import "$config[dir_templates]$config[template]";</style>

But that didnt help.
The problem is that some small issues dont look right in Firerfox
So i would like to have 2 different CSS files

Really hope you can help me - or guide me the right way.

C yaa | Cheers

_____________________________________
Kimo Webactor.dk

» Quick.Cms v2.x

gabetu

No avatar

2008-11-05 11:01

I think you should specify which IE (e.g. 6, 7, or even 8 :)
I always use different stylesheets for IE6 and IE7:
<!--[if gte IE 7]>
<style type="text/css">@import "link to/ie7.css";</style>
<![endif]-->
<!--[if IE 6]>
<style type="text/css">@import "link to/ie6.css";</style>
<script defer type="text/javascript" src="link to/pngfix.js"></script>
<![endif]-->

lte = lower than or equal
gte = greater than or equal

Read more here: http://www.spyka.net/tutorials/IE-conditional-comments

kalanta

No avatar

2008-11-05 11:51

you can use default.css for all browsers (Firefox, Opera...) except IE.

in container.tpl istead a line:

<style type="text/css">@import "$config[dir_templates]$config[template]";</style>

put:

<link rel="stylesheet" type="text/css" href="templates/default.css" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="templates/default_ie.css" />
<![endif]-->

webactor

Avatar: webactor

2008-11-05 12:03

Hi gabetu

Super duper with the reply.
But i just dont get it.

Can you show an ex. on how the text/code should fit into
the Container.tpl file.

No matter what i do - it still reacts on the default.css file.


Hope you can help a newbie on this if IE issue :)

C yaa | Cheers

_____________________________________
Kimo Webactor.dk

webactor

Avatar: webactor

2008-11-05 12:30

Hi kalanta

Uiihaaa - super duper thank you for the reply kalanta
I WORKS .. ha ha ..

Thank you both

C yaa | Cheers

_____________________________________
Kimo Webactor.dk

Back to top
about us | contact