Last active
August 29, 2015 14:07
-
-
Save aleksmiller/8d2631c514724960b3e7 to your computer and use it in GitHub Desktop.
Centered header with left/right background
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
.heading {text-align: center;} | |
.heading:before, | |
.heading:after {content: "~";display: inline-block;vertical-align: middle;} | |
.heading:before {margin-right: 10px;} | |
.heading:after {margin-left: 10px;} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="heading.css"> | |
<title></title> | |
</head> | |
<body> | |
<div class="heading">Title</div> | |
</body> | |
</html> |
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
.heading | |
text-align: center | |
&:before, | |
&:after | |
content: "~" | |
display: inline-block | |
vertical-align: middle | |
&:before | |
margin-right: 10px | |
&:after | |
margin-left: 10px |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment