Skip to content

Instantly share code, notes, and snippets.

@sebbdk
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save sebbdk/dc897166aafbe8e80e43 to your computer and use it in GitHub Desktop.

Select an option

Save sebbdk/dc897166aafbe8e80e43 to your computer and use it in GitHub Desktop.
Scroll scale/position fix
<div class="scroll-dialog">
<img src="header.png" style="width: 100%;" />
<div class="scroll-content"></div>
<img src="footer.png" style="width: 100%;" />
</div>
.scroll-dialog {
width: 80%;
position: absolute;
top: 40px;
left: 10%;
}
.scroll-content {
background-image: url(bg-gradient.png);
/* a horizontal slice of middle the scroll repeating vertically, this way the dialog can be eny height*/
background-size: 100% 100%; /*stretch to fit*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment