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

edited February 2007 in Vanilla 1.0 Help
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: 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 :)


  • Options
    You do have styles, don't you?
  • Options
    P.S. Html formatting and <code></code> tags make life a lot easier for people trying to help you :)

    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?
  • Options
    jimw - i've built a theme and style according to these instructions. There are a few things not displaying properly in IE, therefore i need it to somehow call the IE stylesheet from the head whenever the user is in IE.

    [-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 :)
  • Options
    Sorry, didn't realise it was for a theme or that it was different for themes than extensions. Unfortunately I have n experience with themes so far, so you'd be better off with a response from Jazzman...
  • Options
    t'sall good :)

    i've had someone look at it and it's working now :)
  • Options
    Would you mind posting the solution please? I'm sure it will help others in the future when they come up against this problem and search the forum, thanks ;)
  • Options
    Sorry for the delay...

    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]-->'; }
  • Options
    Cheers for that :) *bookmarked*
This discussion has been closed.