Skip to content

Instantly share code, notes, and snippets.

@jonathansousa
Created May 7, 2012 22:32
Show Gist options
  • Save jonathansousa/2631070 to your computer and use it in GitHub Desktop.
Save jonathansousa/2631070 to your computer and use it in GitHub Desktop.
Dabblet: List Single Item Positioning Experiment
/**
* List Single Item Positioning Experiment
* The first commented line is your dabblet’s title
*/
ul {
position:relative;
}
ul:hover > li {
float:left;
}
li {
list-style:none;
display:none;
padding:20px;
}
li:nth-child(3) {
background:#660000;
position:absolute;
top:120px;
left:100px;
}
li:last-child {
float:left;
display:block;
}
ul:hover > li:nth-child(2) ~ li {
float:left;
display:block;
}
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
</ul><!-- content to be placed inside <body>…</body> -->
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment