Skip to content

Instantly share code, notes, and snippets.

@dziudek
Created March 19, 2012 18:46
Show Gist options
  • Save dziudek/2123646 to your computer and use it in GitHub Desktop.
Save dziudek/2123646 to your computer and use it in GitHub Desktop.
Button with background for left and right side.
/**
* Button with background for left and right side.
*/
div {
height: 32px;
line-height: 32px;
background: #c00;
float:left;
padding: 0 10px;
margin: 0 0 0 50px;
}
div:before {
content: "";
background: #cc0;
width: 20px;
height: 32px;
display: block;
margin: 0 0 0 -30px;
float:left;
}
div:after {
content: "";
background: #0cc;
width:20px;
height:32px;
display:block;
margin: 0 -30px 0 0;
float:right;
}
<!-- content to be placed inside <body>…</body> -->
<div>Text</div>
{"view":"split","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment