Search code examples
htmlcssinternet-explorer

CSS Box Shadow Around Entire Div In IE 11


I cannot get box-shadow to create a shadow around the entire perimeter of a div. The following works in FireFox, however not in IE 11.

I have tried the following: Internet Explorer - CSS Shadow All Around

Here is a JSFiddle for the problem. CSS:

 .addAccountPanel
 {
    width:250px; 
    height:200px; 
    margin:auto; 
    background-color: rgba(0,0,0, .2); 
    position:relative; 
    box-shadow: 0px 0px 4px #004C7E;
 } 

HTML:

  <div class="addAccountPanel"> </div>

Solution

  • There is a fourth parameter in the box-shadow that lets you increase the size of the shadow, and makes it more visible

    .addAccountPanel
        {
            width:250px; 
            height:200px; 
            margin:auto; 
            background-color: rgba(0,0,0, .2); 
            position:relative; 
            box-shadow: 0px 0px 4px 2px #004C7E;
        }
    

    fiddle