Ok. I'm entirely new to this an an awful sot when it comes to coding.

I can't get things in a menu I'm using to appear properly in IE.

The menu box breaks out and I have separate CSS to get it moving in IE.

I've tried searching for the topic but can't seem to dig anything up.

Comments

Suzy’s picture

You need to add the conditional comment (the bit in your first example that calls IE's CSS) into your page.tpl.php file

You can use a conditional comment for more than just a menu so I would suggest setting up the 'conditional' to call a general file called ie6.css (that way you can then use the ie6.css file for other fixes to less than IE7 which is the recommended way to workaround IE issues, IE7 will not have nearly so many problems so isolating it now might be a good idea, you can always add more specific conditional calls later)

1. in your themes page.tpl.php just before the closing </head> tag put something like this..

<!--[if lt IE 7]>
<style type="text/css" media="screen, tv, projection">@import "/themes/YOURTHEMENAME/ie6.css";</style>
<![endif]-->

(you will need to add /drupal to the start of that path if it's staying in the drupal sub-directory where you have it now)

2. then paste your menus CSS (contents of the 2Menu4IE.css file?) into ie6.css and also put this line:
body { behavior:url("ADxMenu.htc"); } into the ie6.css file (at the top perhaps)
Note: the path changes!

3. then the actual ADxMenu.htc (behaviour) file needs to be uploaded directly into your theme's root folder, so style.css, ie6.css, the .htc file are all in the same folder ~ if you do it the way suggested above that is..

You can separate it out if you like (have the menu's css completely separate) the same as it is now, just remember that the behaviour file is called relative to the css file and make sure that your menus .css file and the .htc (behaviour) file are in the same directory and that you reference that directory properly from the conditional comment and all should be well..

nateb’s picture

print $head;
print $styles;
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') )
{
  	print theme('stylesheet_import', base_path() . path_to_theme() . '/2MenuN4IE.css');

}
else
{
  $browser = 'Other browsers';
}

I'm not sure if this is the most streamlined way of doing things, but it does import the proper IE CSS over the default CSS to get the fixes working that I needed.