Style:
#logo {
position: absolute;
top: 14px;
left: 14px;
width: 120px;
height: 72px;
background-color: #abc;
color: black;
outline: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.75);
/* The background image is set inline */
}
JSFiddle:
Chrome:

FireFox:

Why is the FireFox version drawing the margin so far away from the box? Can I stop it from doing so, or can I achieve the same visual result using some other method?
In Firefox,
box-shadowpushesoutlineoutward. (Not sure if by bug or by feature…)Method 1
I’d achieve what you’re trying to do by wrapping it in another
div, and applying thebox-shadowto that.Like so:
Fiddle
Method 2
You can use
outline-offsetand a Firefox CSS hack if you do not wish to use the wrapperdiv. Now, please do not ask why I used21pxinstead of15px; I got to that value by testing… it should have worked with15px.Fiddle