Created
July 18, 2013 14:21
-
-
Save hugobarauna/6029744 to your computer and use it in GitHub Desktop.
Stacking context example - broken stacked menus
This file contains hidden or 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
/** | |
* Stacking context example - broken stacked menus | |
*/ | |
div { font: 12px Arial; } | |
span.bold { font-weight: bold; } | |
div.lev1 { | |
width: 250px; | |
height: 70px; | |
position: relative; | |
border: 2px outset #669966; | |
background-color: #ccffcc; | |
padding-left: 5px; | |
} | |
#container1 { | |
z-index: 1; | |
position: absolute; | |
top: 30px; | |
left: 75px; | |
} | |
div.lev2 { | |
opacity: 0.9; | |
width: 200px; | |
height: 60px; | |
position: relative; | |
border: 2px outset #990000; | |
background-color: #ffdddd; | |
padding-left: 5px; | |
} | |
#container2 { | |
position: absolute; | |
top: 30px; | |
left: 110px; | |
} | |
div.lev3 { | |
z-index: 10; | |
width: 100px; | |
position: relative; | |
border: 2px outset #000099; | |
background-color: #ddddff; | |
padding-left: 5px; |
This file contains hidden or 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
<br /> | |
<div class="lev1"> | |
<span class="bold">LEVEL #1</span> | |
<div id="container1"> | |
<div class="lev2"> | |
<br /><span class="bold">LEVEL #2</span> | |
<br />z-index: 1; | |
<div id="container2"> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
<div class="lev3"><span class="bold">LEVEL #3</span></div> | |
</div> | |
</div> | |
<div class="lev2"> | |
<br /><span class="bold">LEVEL #2</span> | |
<br />z-index: 1; | |
</div> | |
</div> | |
</div> | |
<div class="lev1"> | |
<span class="bold">LEVEL #1</span> | |
</div> | |
<div class="lev1"> | |
<span class="bold">LEVEL #1</span> | |
</div> | |
<div class="lev1"> | |
<span class="bold">LEVEL #1</span> | |
</div> |
This file contains hidden or 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 hidden or 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":"separate","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment