I am working with css outline property, and I found that it is working differently between Chrome and Firefox if descendant elements are outside.
- in Chrome, outline is only for itself range, even though any descendant elements are outside of itself area.
<div style="
margin: 100px;
width: 100px;
height: 100px;
background: blue;
outline: solid 1px red;
position: relative;">
<div style="
width: 100px;
height: 100px;
background: green;
position: absolute;
left: 50px;
top: 50px;">
</div>
</div>
I want Firefox to get same outline effect than Chrome.
Of course i know about border or box-shadow, but i can't use border now for some other reason. Because sometimes div has radius border, in this time border or box-shadow is radius, but it should have rectangular outline, so we can't use border or box-shadow.
How can I do this?