Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
IE Conditional Selectors Problem
Hi,
I'm a newbie to Vanilla and CSS and am having trouble getting IE to see its own stylesheet (i'm using IE7, haven't tested in IE6). I've tried a couple of things.
1. I installed the Custom Styles extension, but get this error:
A fatal, non-recoverable error has occurred
Technical information (for support personel):
Error Message
An error occurred while attempting to retrieve styles.
Affected Elements
StyleManager.GetStylesForSelectList();
The error occurred on or near: Unknown column 'u.Name' in 'field list'
For additional support documentation, visit the Lussumo Documentation website at: lussumo.com/docs
2. I've tried the underscore hack and star hack, but that doesn't seem to work with IE7
3. I've tried to call the stylesheet from head.php with this:
<!--[if IE]>
<link rel="stylesheet" href="ie.css" type="text/css" media="screen" />
<![endif]-->
First time i tried this, i had a parse error, so I moved it to look like this, but I don't think it did anything...
$HeadString .= '
<link rel="stylesheet" type="text/css" href="'.$StyleSheet['Sheet'].'"'.($StyleSheet['Media'] == ''?'':' media="'.$StyleSheet['Media'].'"').' />
<!--[if IE]>
<link rel="stylesheet" href="ie.css" type="text/css" media="screen" />
<![endif]-->';
I don't know much about PHP, so if this (option 3) is the way to go, what am I doing wrong? Also, my xhtml isn't completely valid, but my Wordpress version is working fine.
Thanks :)
0
This discussion has been closed.
Comments
I've used conditional comments in my JQThickBox extension, but it's a hell of a lot simpler than what you have above. Does it need to be that complicated?
[-Stash-] - that's basically what I want to do, however your method is for an extension and using the
$Head->AddString
throws a parse error when I incorporate that into the actual head.php file. Am I supposed to do something like change the above code to$HeadArray
?? I seriously have no idea about PHP, but am just guessing based on what I've seen so far...Thanks
i've had someone look at it and it's working now
the answer is actually really easy - just add $HeadString .=' to the string, after the } on the previous string, so...
$HeadString .=' <!--[if lte IE 7]><link rel="stylesheet" href="'.$this->Context-> StyleUrl.'ie.css" type="text/css" media="screen" /><![endif]-->'; }