PDA

View Full Version : Problem with dropdown menu only in Internet Explorer



felicia63
12-10-2010, 04:42 PM
I can't seem to make the code for dropdownmenu work in Internet Explorer. It works in Firefox, Chrome and Safari. Am I missing something in this menu that IE is being fussy about?

<div id="menu">
<div id="bluemenu" class="bluetabs">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="" rel="dropmenu1">Martial Arts</a></li>
<li><a href="" rel="dropmenu2">Fitness</a></li>
<li><a href="instructors.php">Instructors</a></li>
<li><a href="facilities.php">Facilities</a></li>
<li><a href="">Photo Gallery</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
</div>

<!--1st drop down menu -->
<div id="dropmenu1" class="dropmenudiv_b">
<a href="adult_classes.php">Adult Classes</a>
<a href="youth_classes.php">Children's Programs</a>
<a href="specialty.php">Specials/Events</a>
<a href="https://clients.mindbodyonline.com/ASP/home.asp?studioid=7084" target="_blank">Class Schedule</a>
</div>

<!--2nd drop down menu -->
<div id="dropmenu2" class="dropmenudiv_b">
<a href="kickboxing.php">Cardio Kickboxing</a>
<a href="zumba.php">Zumba&reg;</a>
</div>

<script type="text/javascript">
//SYNTAX: tabdropdown.init("menu_id", [integer OR "auto"])
tabdropdown.init("bluemenu")
</script>

Schmoopy
12-10-2010, 05:09 PM
Can you post a link to the page that's not working in IE?

Can't really do much with just the HTML, need CSS too, since that's probably got a lot to do with it. A link would be more useful however.

felicia63
12-10-2010, 05:41 PM
here is the link:

http://www.selfdefenseri.com/index.php

Schmoopy
12-11-2010, 11:50 AM
After a bit of fiddling around, I've discovered that the problem is not in fact with the menu itself, but just your doctype. You've declared the doctype twice, and this confuses IE - in mine it defaults to quirks mode because it doesn't know how to handle the page.

If you put it in normal mode (IE7 or IE8) it works fine.
So to fix the problem just change the top part of your page from:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<title>Self Defense and Fitness Center, RI</title>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HEAD>
<title>Self Defense and Fitness Center, RI</title>


to



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<HTML>

<HEAD>
<title>Self Defense and Fitness Center, RI</title>


This should fix your problem.

felicia63
12-11-2010, 01:49 PM
I see, the problem is that it is a php site and I used the doctype info on top.php and then on all the individual pages. I put in your code on top.php and removed the doctype info from all the other pages so that they start with the include top.php code.

It is still not working in IE.

Schmoopy
12-11-2010, 02:20 PM
Hmm, works for me now both in IE7 and 8.

Check you haven't got IE stuck in quirks mode.

felicia63
12-11-2010, 03:11 PM
I am using IE 6. How would I check quirks mode? Should I upgrade my IE? I am not a PC person, I prefer macs. But I am checking this website on a PC.

Schmoopy
12-11-2010, 03:55 PM
Oh, I didn't realise you were using IE 6. I don't have access to that atm.

You shouldn't worry too much about IE 6... it is 9 years old.

People should really just upgrade their browsers.

felicia63
12-11-2010, 06:31 PM
Thank you so much for all your help. I have upgraded to IE 8 and everything is working fine.