Internet Explorer 8 Website Display Issue

rockfly
rockfly used Ask the Experts™
on
Hi,

  I have a small website for a rural hospital in Georgia that has an issue displaying the dropdown menus in IE8 (webpage opens up to all dropdowns being in extended position), this can be corrected by running IE8 in compatibility mode but most users in community aren't aware of this feature.  Does anyone know of a quick fix that would allow for dropdowns to open properly in IE8 by forcing the browser to run in compatibility mode when viewing the hospital webpage.  

Thanks,

Steven
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
CvD

Commented:
Please supply the webaddress, so I can have a look at what you mean.
The real solution would probably be rewriting the code so it would be correctly displayed in IE8.
What you are looking for is a workaround. If you are using IIS as the web server for that site, check out this link:
http://weblogs.asp.net/joelvarty/archive/2009/03/23/force-ie7-compatibility-mode-in-ie8-with-iis-settings.aspx

Even if you aren't using IIS, the solution is there:
Add <meta http-equiv="X-UA-Compatible" content="IE=7" /> to the <head> section before any <css>
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Have you tried the solution I provided?

Author

Commented:
About to test it now Naomelixes.
Great! Let me know how it goes, then :)

Author

Commented:
Adding that line of code caused all the menus to compress on the left hand side and a black bar below the top graphic.  Example attached. website w/code added

Author

Commented:
Reverting back to original code now. :)
CvD

Commented:
Tried to open the website, but the server is not responding.
CvD

Commented:
Ok, I can reach it know. I'll have a look at it and come back to you.

Author

Commented:
Yes there seem to be some temporary issues with our hosting company where the website is down sporadically today.  Sorry about that.
Commented:
Have looked into it, but receive several errors when loading the website, amongstwith errors in javascripts, that could block execution of other scripts. Here are the javascript errors:

SCRIPT5009: innerWidth is not defined
menu.js, row 233 pos 34
SCRIPT1004: ';' is expected
copyright-allwebco.js, row 8 pos 55
SCRIPT5009: o is not defined
www.putnamgeneral.com, row 1 pos 1    

Since the variable o has reference to SUB[1-n] and is prototyped with a ShowMenu en HideMenu method, it must be defined before it is used. This could be a simple scoping issue, but it could also be that because of the other script errors, further execution is deffered. I would suggest you take care of the other errors first. It might solve your problem.

I'm not quit sure, but I think IE8 also has a debug tool under F12. I am running IE9 and through its F12 function I saw the errors coming up.
CvD

Commented:
Ok, have dived into it a bit more and came up with the fiollowing solution.

before the <html> tag enter the followign line of code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

this should give you the solution. Tested it on IE9, Firefox, Safari and Chrome.

Author

Commented:
Thanks CvD!  Added the code you suggested along with attempting a few variations on it (back to your original suggestion now), still results in same dropdown issue in IE8 & IE9 without compatibility view enabled.  Works fine in IE6, 7, Firefox, Chrome.

Thanks,

Steven

 PGH Website Dropdown
CvD

Commented:
Hmmm, strange. I've copied the source of your index.html and used the <base> tage to reffer to you site. Next I entered the <!DOCTYPE> tag exactly as shown above. Tested it in IE9 without compatibility view enabled and it worked like a charm. The <!DOCTYPE> tag provide, switches on quirks mode making maximum compatibility possible.

No more suggestions at the moment right know, except you should get rid of all javascript errors first and then test again. Because the hiding en viewing is done through script actions. If execution has been broken by the browser before you come to hiding the menus, they will be visible still.

Author

Commented:
I'll do my best to remedy the existing javascript errors, test, and update the thread with what I find CvD, thanks again for all your help.

Author

Commented:
Solution was partial, required further research.

Author

Commented:
CvD you fixed it!  Sorta.  After trying every variation under the sun to force IE8 into IE7 or quirks mode, I noticed in your third post the name of the company that had created the template "copyright-allwebco.js" that the website was originally built off of. I googled with that info and "dropdown menu issue" and the first hit was the exact solution detailed step by step... http://allwebco-templates.com/support/S_dropdown_menus_IE7Update.htm

Thanks so much for giving me the hint that led to the answer.

Steven

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial