On Drupal 6 using a Zen subtheme, our custom stylesheet is beautiful and perfect everywhere except in ie7. Appears to be the :hover bug, where any link we hover over causes the main content area to jump over the left sidebar (is that called margin collapse or margin reset?).
Tried setting min-height: 1% on all :hover and parent elements, but there are soooo many finally decided to specify an 'ie7specific.css' which has zero hover elements defined. Tough luck for ie7 users.
However, in the myspecialsub_theme.info file the myspecialsub_theme.css is automatically sent to IE, therefore creating the :hover elements. We need to specify IE7 gets it's specific css and all other browsers get the regular.
conditional-stylesheets[if gt IE 7][all][] = myspecialsub_theme.css
conditional-stylesheets[if IE 7][all][] = ie7specific.css
conditional-stylesheets[if lt IE 7][all][] = myspecialsub_theme.css
conditional-stylesheets[if !IE][all][] = myspecialsub_theme.css
Works for IE versions, but firefox is not getting the stylesheet. Why isn't the !IE working, what should I use instead?
Or does anyone have a different solution for the problem described? Thanks much in advance!
UPDATE: My comment did not display well below, here is the solution I finally found:
Solution thanks to wikipedia.org/wiki/Conditional_comment
In the subtheme.info:
; stylesheets[all][] = specific_subtheme.css
conditional-stylesheets[if gt IE 7][all][] = specific_subtheme.css
conditional-stylesheets[if IE 7][all][] = ie7specific.css
conditional-stylesheets[if lt IE 7][all][] = specific_subtheme.css
In page.tpl.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>">
<head>
<title><?php print $head_title; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<?php print $head; ?>
<?php print $styles; ?>
<![if !IE]>
<link href="/sites/all/themes/specific_subtheme/specific_subtheme.css" rel="stylesheet">
<![endif]>
<?php print $scripts; ?>
</head>
Crazy huh?
FINAL UPDATE: Best yet, finally discovered the source of :hover bug in zen subtheme. the div main needs a zoom:1; and none of these conditional stylesheets are necessary. But there you go if you cannot solve the original problem.