Connecting Tech Pros Worldwide Help | Site Map

My Drop Down Menus are a Mess in IE7

Newbie
 
Join Date: Jun 2007
Posts: 5
#1: Jun 4 '07
I have very limited knowledge of websites (actually purchased complete website from ex-employer) and knowledge of HTML is also limited to adding/editing content on site.
Since IE7 came around my drop down menus are a mess and I think it's time I really got the problem sorted.
Can anyone point me in the right direction? My website is
Link

Many thanks in advance

Allan
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,561
#2: Jun 4 '07

re: My Drop Down Menus are a Mess in IE7


First thing you can do is go through the markup and delete all slashes where you see exactly this: />

That is a XHTML ending tag but you are using Html. Sometimes browsers will stop processing at that point. Then let's see where we stand.
Newbie
 
Join Date: Jun 2007
Posts: 5
#3: Jun 4 '07

re: My Drop Down Menus are a Mess in IE7


Thanks for your reply. I have deleted the slashes where I found /> . There was four, which appeared at the end of the HTML that referred to the four Style Sheets.

No change to the appearance of my drop down menus.
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,561
#4: Jun 4 '07

re: My Drop Down Menus are a Mess in IE7


Your menus were created using javascript and not html or css, directly. I'm sending this to the javascript board.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#5: Jun 5 '07

re: My Drop Down Menus are a Mess in IE7


My guess is that it's probably going wrong because you're using a browser detect. That is always prone to breaking in the future whenever a new browser comes out.

You should use object detection instead.

I suppose the variable ieBox is causing the problem, though I can't be certain. It checks if the IE browser is in quirks mode using the proprietary document.compatMode property. IE7 has probably changed a few things around so the properties possibly don't match thus causing the messy display.
Newbie
 
Join Date: Jun 2007
Posts: 5
#6: Jun 5 '07

re: My Drop Down Menus are a Mess in IE7


Hi acoder,

Thanks for the reply. Can you point me in the right direction as to how I change things from browser detection to object detection.

Or is a better option to change the drop-down menus from javascript to HTML?

I'm just learning HTML so have no clue about javascript.

Bset regards
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#7: Jun 6 '07

re: My Drop Down Menus are a Mess in IE7


It can be difficult if there is a lot of code, but some objects are supported/not supported by browsers, e.g. pageXOffset is not supported by IE.

So wherever you see certain objects being used in your code, just check for it first. Of course, it's not that easy, but you could check out the Quirksmode website which covers a lot of these compatibility problems.
Reply


Similar JavaScript / Ajax / DHTML bytes