My CSS menu (with UL LI) is not working in IE 8

Posted by Sheonarayan under Error and Solution on 5/28/2014 | Points: 10 | Views : 1864 | Status : [Administrator] | Replies : 0

Problem

There might be scenario where a menu including dropdown menu such as in this website (main menu) may work properly in all recent browsers but not in older version of the browser such as IE8, IE9 etc.

Solution


This generally happens because of the incapability of that browser engine to understand the CSS selectors written for the menu system.

Keep the selector of the menu element simple, like

[#navMainMenu ul li ul li:hover] instead of [nav#navMainMenu ul li ul li:hover]

Make sure that your primary selector is the single and not combination of multiple selectors as these kinds of selectors were not supported by older browsers.

In above example, first I was trying to select nav and then element having id as navMainMenu that was not working in IE8 but when I removed nav from the selector, it started working in IE8.

At least this works for us, so thought of sharing here.

Hope this will be helpful for others.

Regards,
Sheo Narayan
http://www.dotnetfunda.com



Responses

(No response found.)

Login to post response