Skip to content

Instantly share code, notes, and snippets.

@adammockor
Created July 31, 2014 09:01
Show Gist options
  • Save adammockor/a37939060950e8d8847c to your computer and use it in GitHub Desktop.
Save adammockor/a37939060950e8d8847c to your computer and use it in GitHub Desktop.
Crossed header with line - responsive without background
h1 {
overflow: hidden;
text-align: center;
}
h1:before,
h1:after {
background-color: #000;
content: "";
display: inline-block;
height: 1px;
position: relative;
vertical-align: middle;
width: 50%;
}
h1:before {
right: 0.5em;
margin-left: -50%;
}
h1:after {
left: 0.5em;
margin-right: -50%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment