Skip to content

Instantly share code, notes, and snippets.

@ron4stoppable
Created December 30, 2016 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ron4stoppable/df2a4ec2e49f00761e8f27e97132889b to your computer and use it in GitHub Desktop.
Save ron4stoppable/df2a4ec2e49f00761e8f27e97132889b to your computer and use it in GitHub Desktop.
border (frame) overlay and inset on image
div.ie-container {
display: inline-block;
position: relative;
}
div.ie-container:before {
display: block;
content: '';
position: absolute;
top: 4px;
right: 4px;
bottom: 4px;
left: 4px;
border: 1px solid white;
}
img {
vertical-align: middle; /* optional */
}
// border(frame) overlay image
// not compatiable under IE10
img {
outline: 1px solid white;
outline-offset: -4px;
}
<div id="std">
<img src="//lorempixel.com/200/200" />
</div>
<div id="comp">
<div class="ie-container"><img src="//lorempixel.com/200/200" /></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment