Skip to content

Instantly share code, notes, and snippets.

@drublic
Created February 6, 2013 16:40
Show Gist options
  • Save drublic/4723853 to your computer and use it in GitHub Desktop.
Save drublic/4723853 to your computer and use it in GitHub Desktop.
Sticking problems
/**
* Sticking problems
*/
.fixed {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 40; /* Needed because of other content */
background: #eee;
}
.child {
}
/* Needs to overlay .fixed but under .child */
.overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 50;
}
<div class="fixed">
<a href="#test" class="child">Click me</a>
</div>
<a href="#!" class="overlay"></a>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment