Skip to content

Instantly share code, notes, and snippets.

@bundyo
Created September 28, 2012 05:17
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 bundyo/3798048 to your computer and use it in GitHub Desktop.
Save bundyo/3798048 to your computer and use it in GitHub Desktop.
Untitled
.container
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center;
}
.container:before,
.box
{
display: inline-block;
vertical-align: middle;
}
.container:before
{
content: "";
width: 0;
margin-left: -10px;
height: 100%;
}
.box
{
text-align: left;
background: #333;
width: 400px;
height: 300px;
border-radius: 1em;
border: 1px solid #fff;
background-clip: padding-box;
position: relative;
box-shadow: 0 0 5px rgba(0,0,0,.5);
}
.box:before
{
content: "";
display: block;
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
outline: 9999px solid rgba(0,0,0,.5);
outline-offset: -5px;
}
Text
<div class="container">
<div class="box"></div>
</div>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment