Skip to content

Instantly share code, notes, and snippets.

@maherelgamil
Last active January 13, 2023 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maherelgamil/1ac71adc144e0aa464aa0c934b52718c to your computer and use it in GitHub Desktop.
Save maherelgamil/1ac71adc144e0aa464aa0c934b52718c to your computer and use it in GitHub Desktop.
page separator with only html & css
.page-separator {
margin-top: 1.5rem;
margin-bottom: 1.5rem;
line-height: 1em;
position: relative;
outline: 0;
border: 0;
color: #000;
text-align: center;
height: 1.5em;
opacity: .5;
width: 100%;
}
.page-separator:before {
content: '';
background: -webkit-gradient(linear,left top,right top,from(transparent),color-stop(#818078),to(transparent));
background: linear-gradient(to right,transparent,#818078,transparent);
position: absolute;
left: 0;
top: 50%;
width: 100%;
height: 1px;
}
.page-separator:after {
content: attr(data-content);
position: relative;
display: inline-block;
padding: 0 0.5em;
line-height: 1.5em;
color: #1a1a19;
background-color: #fcfcfa;
}
<hr class="page-separator" data-content="Page No. 11"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment