Created
December 20, 2015 09:26
-
-
Save YauhenKavalchuk/8a1da9f57d9a6e566ad6 to your computer and use it in GitHub Desktop.
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
HTML: | |
<div class="divider"> | |
<div class="divider__text"> | |
Text | |
</div> | |
</div> | |
SCSS: | |
.divider { | |
text-align: center; | |
overflow: hidden; | |
} | |
.divider__text { | |
display: inline-block; | |
position: relative; | |
padding: 10px; | |
&:after, &:before { | |
content: ""; | |
display: block; | |
height: 1px; | |
width: 2000px; | |
position: absolute; | |
background: #000; | |
top: 50%; | |
margin-top: -1px; | |
} | |
&:after { | |
right: 100%; | |
} | |
&:before { | |
left: 100%; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment