Created
March 25, 2012 08:55
-
-
Save dziudek/2192475 to your computer and use it in GitHub Desktop.
Method to place visual separator between table cell's without using additional HTML elements
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
/** | |
* Method to place visual separator between table cell's without using additional HTML elements | |
*/ | |
body > div { | |
display:table; | |
width: 600px; | |
} | |
body > div > div { | |
display: table-cell; | |
background: #eee; | |
height: 300px; | |
vertical-align: top; | |
position: relative; | |
padding: 0 60px; | |
} | |
body > div > div:before { | |
content: ""; | |
position: absolute; | |
width: 50px; | |
height: 140px; | |
background: #a00; | |
left: -25px; | |
top: 50%; | |
margin-top:-70px; | |
} | |
body > div > div:first-child:before { | |
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> --> | |
<div> | |
<div>Lorem</div> | |
<div>Ipsum</div> | |
<div>Dolor</div> | |
</div> |
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","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment