Skip to content

Instantly share code, notes, and snippets.

@rodp
Created September 26, 2011 12:16
Show Gist options
  • Save rodp/1242100 to your computer and use it in GitHub Desktop.
Save rodp/1242100 to your computer and use it in GitHub Desktop.
CSS puzzle solution
/**
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