Skip to content

Instantly share code, notes, and snippets.

@demee
Created February 28, 2013 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save demee/5056793 to your computer and use it in GitHub Desktop.
Save demee/5056793 to your computer and use it in GitHub Desktop.
Untitled
body {
margin: 0;
}
* { box-sizing: border-box;}
#wrapper {
top: 100px;
border: 1px solid green;
overflow: hidden;
margin-top: 40px;
}
#container{
width: 100px;
}
#content {
border: 1px solid green;
height: 200px;
}
#map {
position: fixed;
background: yellow;
top: 40px;
bottom: 0;
left: 100px;
right: 0px;
}
div.overflow {
position: relative;
}
div.item {
border: 1px solid red;
display: block;
height: 100px;
width: 90px;
position: absolute;
top: 20px;
left: 50px;
background: green;
z-index: 2;
}
<div id="map">
asdfasdfasdfasdf
</div>
<div id="wrapper">
<div id="container">
<div id="content">
Lorem ipsum dolor sit amet, in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<div class="overflow">
&lt;anchor&gt;
<div class="item">foo</div>
</div>
</div>
document.getElementById("wrapper").scrollTop=200;
{"view":"separate","fontsize":"70","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment