Created
October 7, 2014 07:49
-
-
Save vzabaznov/4c4ea577ec25352fd333 to your computer and use it in GitHub Desktop.
How to make border length smaller than div length
From http://stackoverflow.com/questions/8572952/border-length-want-less-then-div-width
This file contains hidden or 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
| div { | |
| width : 200px; | |
| height : 50px; | |
| position: relative; | |
| z-index : 1; | |
| } | |
| div:before { | |
| content : ""; | |
| position: absolute; | |
| left : 0; | |
| bottom : 0; | |
| height : 1px; | |
| width : 50%; /* or 100px */ | |
| border-bottom:1px solid magenta; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment