Skip to content

Instantly share code, notes, and snippets.

@mattradford
Created July 21, 2015 12:03
Show Gist options
  • Save mattradford/9ab8b7097809c2e7a36e to your computer and use it in GitHub Desktop.
Save mattradford/9ab8b7097809c2e7a36e to your computer and use it in GitHub Desktop.
Heading with strikethrough line. Needs a heading with an inner span
.struckthrough {
padding: 36px 10px;
h2 {
text-align: center;
position: relative;
z-index:1;
font-size: 20px;
text-transform: uppercase;
margin: 0;
&:before {
border-top: 1px solid black;
content:"";
margin: 0 auto;
position: absolute;
top: 50%; left: 0; right: 0; bottom: 0;
width: 100%;
z-index: -1;
}
span {
background: #fff;
padding: 0 48px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment