Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Created October 9, 2014 14:58
Show Gist options
  • Save gunnarbittersmann/1db6c3a5765399a693de to your computer and use it in GitHub Desktop.
Save gunnarbittersmann/1db6c3a5765399a693de to your computer and use it in GitHub Desktop.
z-index with position: relative
/**
* z-index with position: relative
*/
div { display: inline-block; width: 200px; height: 200px }
#green-box { background: green; z-index: 1; position: relative }
#red-box { background: red; margin-left: -100px }
<div id="green-box"></div>
<div id="red-box"></div>
// alert('Hello world!');
{"view":"split-vertical","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