Created
October 3, 2017 15:26
-
-
Save jonbrockett/074633ff46d8e673c2ad9cc6cd76a7ed to your computer and use it in GitHub Desktop.
Line on Sides Heading
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h2 { | |
overflow: hidden; | |
text-align: center; | |
&:before, &:after { | |
background-color: $color; //Color of the line | |
content: ""; | |
display: inline-block; | |
height: .2rem; //Size of the line | |
position: relative; | |
vertical-align: middle; | |
width: 50%; | |
} | |
&:before { | |
right: 4.5rem; //Right padding between the line and heading | |
margin-left: -50%; | |
} | |
&:after { | |
left: 4.5rem; //Left padding between the line and heading | |
margin-right: -50%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment