CodeIgniter Forums
Can I use CSS conditional statements in CI ?? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Can I use CSS conditional statements in CI ?? (/showthread.php?tid=50873)



Can I use CSS conditional statements in CI ?? - El Forum - 04-11-2012

[eluser]vincej[/eluser]
HI - I have just discovered that the nth-child selector is not supported in IE 8 or lower. so time to have an IE css sheet ! That is to say:

Code:
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="all-ie-only.css" />
<![endif]--&gt;

I would like to use the base_url() function so I don't have to remember to change the path when I go live.

Can I somehow accommodate this inside the IE conditional statement ?

Many thanks !!




Can I use CSS conditional statements in CI ?? - El Forum - 04-11-2012

[eluser]ludo31[/eluser]
href="&lt;?php echo base_url(); ?&gt;css/youfile.css"


Can I use CSS conditional statements in CI ?? - El Forum - 04-11-2012

[eluser]InsiteFX[/eluser]
Code:
&lt;!--[if IE]>
    &lt;link rel="stylesheet" type="text/css" href="&lt;?php echo base_url('all-ie-only.css');?&gt;" /&gt;
<![endif]--&gt;



Can I use CSS conditional statements in CI ?? - El Forum - 04-11-2012

[eluser]skunkbad[/eluser]
You could detect the browser type and version and serve a different style sheet.