Created
March 21, 2012 10:22
-
-
Save dziudek/2146020 to your computer and use it in GitHub Desktop.
Layout with the two lines at both sides without using additional elements (only :after and :before)
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
/** | |
* Layout with the two lines at both sides without using additional elements (only :after and :before) | |
*/ | |
div { | |
background: #fff; | |
width:100%; | |
height:30px; | |
text-align: center; | |
position: relative; | |
} | |
div:before, | |
div:after { | |
background:#0a0; | |
content: ""; | |
height:30px; | |
width:30%; | |
right:0; | |
position: absolute; | |
z-index: 1; | |
} | |
div:before{ | |
left:0; | |
right:auto; | |
} | |
div > ul { | |
display:inline-block; | |
position: relative; | |
z-index:2; | |
} | |
div > ul li { | |
float:left; | |
} |
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> | |
<ul> | |
<li>Lorem ipsum dolor sit amet dolor loles x</li> | |
<li>Lorem ipsum dolor sit amet dolor loles x</li> | |
<li>Lorem ipsum dolor sit amet dolores loles x</li> | |
</ul> | |
</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":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment