Skip to content

Instantly share code, notes, and snippets.

@travismillerweb
Last active August 29, 2015 13:57
Show Gist options
  • Save travismillerweb/9693250 to your computer and use it in GitHub Desktop.
Save travismillerweb/9693250 to your computer and use it in GitHub Desktop.
Sass - Line On SIdes Headers
/*
Sass - Line On Side Headers
Reference Link: http://css-tricks.com/line-on-sides-headers/
Implementation Example: <h1 class="fancy"><span>Title</span></h1>
*/
.fancy {
line-height: 0.5;
text-align: center;
span {
display: inline-block;
position: relative;
&:before, &:after {
content: "";
position: absolute;
height: 5px;
border-bottom: 1px solid white;
border-top: 1px solid white;
top: 0;
width: 600px;
}
&:before {
right: 100%;
margin-right: 15px;
}
&:after {
left: 100%;
margin-left: 15px;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment