Skip to content

Instantly share code, notes, and snippets.

@rowej83
Last active March 13, 2019 16:48
Show Gist options
  • Save rowej83/554275a191329b18fddd to your computer and use it in GitHub Desktop.
Save rowej83/554275a191329b18fddd to your computer and use it in GitHub Desktop.
Create a header with a line running behind it. Includes html and css required
<!--
ADD CSS TO STYLE SHEETS TO USE
.line-container {
position: relative;
text-align: center;
z-index:10;
}
.line-container:before {
content: "";
display: block;
position: absolute;
z-index: -1;
top: 50%;
width: 100%;
border-bottom: 3px solid black;
}
.line-container span {
text-align: center;
background-color: white;
padding: 0 0.3em;
}
-->
<h2 class="line-container">
<span>Hello World</span>
</h2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment