I am currently working on a website design that features a fixed menu positioned behind the body. When the menu icon is clicked, some jQuery code shifts the body to the left. To create the effect of the fixed menu being positioned underneath, I have added a shadow to the body. This setup works perfectly in Chrome, Firefox, and Safari. However, in Internet Explorer, there seems to be an issue with clicking the links in the menu due to the drop shadow from the body overlapping them. Is there a simple solution for this problem or a way to disable the CSS specifically for IE?
Below is the relevant code snippets:
The CSS for adding shadow to the main content
.wrapper {
-webkit-box-shadow: 3px 0px 10px 1px rgba(0,0,0,1);
-moz-box-shadow: 3px 0px 10px 1px rgba(0,0,0,1);
box-shadow: 3px 0px 10px 1px rgba(0,0,0,1);
}
The CSS for the fixed menu that appears when the menu button is clicked
.sidemenu {
position: fixed;
right: 0px;
top: 0px;
width: 260px;
height: 100%;
background: #2b2b2b;
z-index: -10;
overflow: hidden;
transition: 0.2s;
color: white;
text-align: center;
}
Solution implemented: Added a JavaScript function to detect Internet Explorer.
if (detectIE() != false) {
$('.sidemenu').css('zIndex', '1000');
}
Adjusting the z-index on IE when the menu is clicked proved to bypass the layering issue effectively enough.