Skip to content

Instantly share code, notes, and snippets.

@dvschultz
Created November 7, 2013 19:28
Show Gist options
  • Save dvschultz/7360480 to your computer and use it in GitHub Desktop.
Save dvschultz/7360480 to your computer and use it in GitHub Desktop.
#epdrctn psuedoselectors
p.whatever-class-it-is {
position: relative;
text-align: center;
padding: 1.5em 0; //this controls the spacing between the rules
}
p.whatever-class-it-is:after, p.whatever-class-it-is:before {
content: '';
position: absolute;
left: 0;
width: 50%
margin: 0 auto; // or maybe margin: 0 25%;
height: 1px;
background-color: black;
//night-mode!
border-top: 1px solid white;
}
p.whatever-class-it-is:before {
top: 0;
}
p.whatever-class-it-is:after {
bottom: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment