0

I'm stuck. I've never done drop down menus before but wanted to try on a site I'm working on, so I imported someone else's java and css code and got it running just fine in Firefox. Problem is, the drop down menus are appearing way off to the right in IE.

I've created a separate style sheet just for IE, but I haven't been able to figure out what to put on it to correct this!

Here's the site: http://www.erricksonequipment.com

There is a lot of superfluous nonsense in that style sheet as it was imported from an online example. That said, there may be issues in there too that are preventing ie from reading correctly? I'm not sure.. I'm new to this java/css drop down menu stuff! :)

Any help would be GREATLY appreciated.

AlexR
  • 114,158
  • 16
  • 130
  • 208
  • I believe your question is not about java. It is probably about javascript + html + css. So I am re-tagging it to allow more relevant people to see your question. – AlexR Jan 31 '11 at 20:34

2 Answers2

1

The script you're using for the drop down menu is not very good. Also, it's quite possible to create that whole drop down menu using just CSS, without any JS.

The drop down menu, in its current state, does not work in IE7 or IE8.

In the spirit of "fixing your problem":

It will work in IE8 (and Firefox, etc) if you change Line 203 in dropdownMenuKeyboard.js from this:

      ? (isie ? li.offsetLeft + 'px' : 'auto')

to this:

      ? 'auto'

However, I recommend you replace the drop down menu code with something more modern.

thirtydot
  • 224,678
  • 48
  • 389
  • 349
  • Glorious- thanks! That works for now at least. Is there a link to a java script that you'd recommend? I don't know a thing about writing/editing java... – zinniacity Feb 01 '11 at 02:21
  • You need to start calling it Javascript (which it is), instead of Java (which it isn't). See this amusing answer which [sums it up](http://stackoverflow.com/questions/245062/whats-the-difference-between-javascript-and-java#answer-245068). A [Suckerfish](http://htmldog.com/articles/suckerfish/dropdowns/) dropdown would be a better replacement. – thirtydot Feb 01 '11 at 09:35
  • Thanks...lol... I feel a lot more educated now! As you can probably see, I'm a newbie at this stuff. :) Thanks for the links! – zinniacity Feb 01 '11 at 17:16
0

Be careful when using 'em' as your unit of measurement. The size of 1 'em' is relative to the default font-size set in your browser (or in your CSS if you define it). By default, these font-sizes differ between Firefox and Internet Explorer. I'd recommend using pixels instead, but if you're set on using 'em', just be sure to add a new default font-size in your CSS by doing something like:

html { font-size: 16px; }

By standardizing the default font-size throughout the browser, you won't see any differences in Firefox or Internet Explorer.

Wex
  • 15,539
  • 10
  • 64
  • 107