Created
May 22, 2012 17:52
-
-
Save dziudek/2770571 to your computer and use it in GitHub Desktop.
CSS Timeline
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
/** | |
* CSS Timeline | |
*/ | |
body { | |
font-family: Arial, sans-serif; | |
} | |
.timeline { | |
border: 1px solid #eee; | |
margin: 50px auto; | |
width: 300px; | |
overflow: hidden; | |
padding: 20px; | |
position: relative; | |
text-align: center; | |
} | |
.timeline:before { | |
background: #aaa; | |
content: ""; | |
display: block; | |
height: 100%; | |
left: 50%; | |
margin: 0 0 0 -2px; | |
position: absolute; | |
width: 4px; | |
z-index: 1; | |
} | |
.timeline strong { | |
background: #fff; | |
border: 1px solid #ccc; | |
border-radius: 3px; | |
display: inline-block; | |
padding: 3px 5px; | |
position: relative; | |
z-index: 2; | |
} | |
.timeline em { | |
display: inline-table; | |
margin: 50px 50% 0 50%; | |
text-align: left; | |
border: 1px solid #000; | |
position: relative; | |
left: 15px; | |
white-space: nowrap; | |
} | |
.timeline em.left { | |
margin: 50px 50% 0 auto; | |
left: 15px; | |
} |
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 class="timeline"> | |
<strong>Important</strong> | |
<em class="left">Note 1 Lorem ipsum dolor</em> | |
<em class="right">Note 2 lorem ip</em> | |
</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","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment