-
-
Save mohamedaboelmagd/979a044b2001af7110657c76f064cdc5 to your computer and use it in GitHub Desktop.
Vertical Line using :after
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
/** | |
* Vertical Line using :after | |
*/ | |
.item { | |
float:left; | |
display:inline; | |
padding-right:10px; | |
} | |
.item:after { | |
content: ""; | |
position: relative; | |
display: block; | |
border-top: 31px solid red; | |
width: 1px; | |
margin: -49px 0px 0px -6px; | |
} | |
.item:first-child:after { | |
display:none; | |
} | |
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
<!-- content to be placed inside <body>…</body> --> | |
<body> | |
<div class="item"> | |
<h4>Item 1</h4> | |
</div> | |
<div class="item"> | |
<h4>Item 2</h4> | |
</div> | |
<div class="item"> | |
<h4>Item 2</h4> | |
</div> | |
</body> |
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
{"view":"split-vertical","fontsize":"90","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment