Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gavinhewitt/cfb41bcec2cbc68d9e4b9f48ee3c0560 to your computer and use it in GitHub Desktop.
Save gavinhewitt/cfb41bcec2cbc68d9e4b9f48ee3c0560 to your computer and use it in GitHub Desktop.
Divider line with centered text
// <div class="divider"><span>ADVERTISEMENT</span></div>
.divider {
text-align: center;
color: #999999;
font-size: 11px;
font-weight: 400;
text-transform: uppercase;
overflow: hidden;
margin-bottom: 9px;
}
.divider:before,
.divider:after {
background-color: #d9d9d9;
content: "";
display: inline-block;
height: 1px;
position: relative;
vertical-align: middle;
width: 50%;
}
.divider:before {
right: 0.5em;
margin-left: -50%;
}
.divider:after {
left: 0.5em;
margin-right: -50%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment