Skip to content

Instantly share code, notes, and snippets.

@ChromeOrange
Created August 4, 2012 12:14
Show Gist options
  • Save ChromeOrange/3257069 to your computer and use it in GitHub Desktop.
Save ChromeOrange/3257069 to your computer and use it in GitHub Desktop.
tweak widths of variation drop downs for IE7 and 8
/****
* Paste this into your custom functions file
* 100% should work but you may need to adjust for each browser seperately
*/
function customloadcss() {
$return .= "<!-- Loading CSS -->" . "\r\n";
$return .= "<!--[if IE 7]>" . "\r\n";
$return .= "<style>" . "\r\n";
$return .= "div.selector select {" . "\r\n";
$return .= " width: 100%;" . "\r\n";
$return .= "}" . "\r\n";
$return .= "</style>" . "\r\n";
$return .= "<![endif]-->" . "\r\n";
$return .= "<!--[if IE 8]>" . "\r\n";
$return .= "<style>" . "\r\n";
$return .= "div.selector select {" . "\r\n";
$return .= " width: 100%;" . "\r\n";
$return .= "}" . "\r\n";
$return .= "</style>" . "\r\n";
$return .= "<![endif]-->" . "\r\n";
$return .= "<!-- Loading CSS -->" . "\r\n\r\n";
echo $return;
}
add_action('wp_head', 'customloadcss');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment