Skip to content

Instantly share code, notes, and snippets.

@marcolago
Created April 23, 2013 14:31
Show Gist options
  • Save marcolago/5444042 to your computer and use it in GitHub Desktop.
Save marcolago/5444042 to your computer and use it in GitHub Desktop.
Per Enrico
/**
* Per Enrico
* header e footer con stack z-index corretto per l'annidamento misto
* aggiungi a .b la classe "top"
* per vedere come si sposta sopra ma resta sotto ad .a
*/
* {
margin: 0;
padding: 0;
border: none;
outline: none;
}
.cont {
width: 100%;
height: 4em;
background-color: rgba(0,0,0,0.2);
position: fixed;
}
.a {
width: 20%;
height: 100%;
background-color: yellow;
position: relative;
z-index: 30;
}
.b {
width: 78%;
height: 4em;
margin-top: -4em;
padding-left: 22%;
background-color: rgba(0,255,255,0.5);
position: fixed;
top: 100%;
bottom: auto;
z-index: 20;
}
.b.top {
top: 4em;
}
<div class="cont">
<div class="a">.a</div>
<div class="b">.b</div>
</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