Created
February 6, 2013 16:40
-
-
Save drublic/4723853 to your computer and use it in GitHub Desktop.
Sticking problems
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
/** | |
* 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; | |
} |
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
<div class="fixed"> | |
<a href="#test" class="child">Click me</a> | |
</div> | |
<a href="#!" class="overlay"></a> |
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":"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