Skip to content

Instantly share code, notes, and snippets.

@dandean
Created July 15, 2013 04:09
Show Gist options
  • Select an option

  • Save dandean/5997439 to your computer and use it in GitHub Desktop.

Select an option

Save dandean/5997439 to your computer and use it in GitHub Desktop.
CSS Puzzle: Reverse the z-order of the <li>s without setting a separate z-index on each one in a way that works in IE9 and up
/**
* CSS Puzzle: Reverse the z-order of the <li>s without setting a separate z-index on each one in a way that works in IE9 and up
*/
ul {
direction: rtl;
display: inline-block;
margin-left: 82px;
margin-top: 8px;
}
li {
list-style: none;
display: inline-block;
padding: 1em 2em 1em 1em;
border: 1px solid rgba(0,0,0,.3);
border-radius: 0 999px 999px 0;
background: beige;
margin-left: -104px
}
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
<li>E</li>
<li>F</li>
<li>G</li>
</ul>
// alert('Hello world!');
{"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