Skip to content

Instantly share code, notes, and snippets.

@YauhenKavalchuk
Created December 20, 2015 09:26
Show Gist options
  • Save YauhenKavalchuk/8a1da9f57d9a6e566ad6 to your computer and use it in GitHub Desktop.
Save YauhenKavalchuk/8a1da9f57d9a6e566ad6 to your computer and use it in GitHub Desktop.
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