Skip to content

Instantly share code, notes, and snippets.

@ArnaudBrousseau
Created December 19, 2010 22:41
Show Gist options
  • Save ArnaudBrousseau/747777 to your computer and use it in GitHub Desktop.
Save ArnaudBrousseau/747777 to your computer and use it in GitHub Desktop.
Create pure CSS borders w/o extra markup | credits to http://csswizardry.com/
/* Create a series of empty pseudo-elements... */
html:before,html:after,body:before,body:after{
content:"";
background:#dad8bb;
position:fixed;
display:block;
z-index:5;
}
/* ...and position them! */
html:before{
height:10px;
left:0;
right:0;
top:0;
}
html:after{
width:10px;
top:0;
right:0;
bottom:0;
}
body:before{
height:10px;
right:0;
bottom:0;
left:0;
}
body:after{
width:10px;
top:0;
bottom:0;
left:0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment