Created
September 26, 2011 12:16
-
-
Save rodp/1242100 to your computer and use it in GitHub Desktop.
CSS puzzle solution
This file contains 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
/** | |
This is a solution for the CSS puzzle at: | |
http://twitter.com/#!/rodpetrovic/status/118277887894888449 | |
Markup: <h1><span>Recent ad activity</span></h1> | |
line.png: 500px line with fadeout on both ends | |
**/ | |
h1 { | |
display: table; | |
width: 500px; | |
white-space: nowrap; | |
} | |
h1 span { | |
display: table-cell; | |
width: 1px; | |
padding: 0 8px; | |
} | |
h1:before, h1:after { | |
display: table-cell; | |
background: url(line.png) no-repeat; | |
content: " " | |
} | |
h1:before { | |
background-position: left center; | |
} | |
h1:after { | |
background-position: right center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment