Created
March 20, 2013 15:09
-
-
Save leechy/5205441 to your computer and use it in GitHub Desktop.
z-index of inner element of fixed parent in Chrome not working
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
/** | |
* z-index of inner element of fixed parent in Chrome not working | |
*/ | |
body { | |
background: white; | |
min-height: 100%; | |
margin: 0; | |
} | |
.div0 { | |
position: fixed; | |
z-index: 70; | |
height: 20px; | |
width: 100%; | |
background-color: black; | |
} | |
.div1 { | |
position: relative; | |
z-index: 1; | |
height: 100px; | |
background-color: pink; | |
} | |
.div2 { | |
position: fixed; | |
top: 0; | |
right: 0; | |
width: 100px; | |
} | |
.div3 { | |
position: absolute; | |
z-index: 75; | |
width: 100px; | |
height: 200px; | |
background-color: lightgreen; | |
} |
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
<div class="div0"></div> | |
<div class="div1"></div> | |
<div class="div2"> | |
<div class="div3"></div> | |
</div> |
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
// alert('Hello world!'); |
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
{"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