Skip to content

Instantly share code, notes, and snippets.

@dziudek
Created May 27, 2012 08:08
Show Gist options
  • Save dziudek/2802794 to your computer and use it in GitHub Desktop.
Save dziudek/2802794 to your computer and use it in GitHub Desktop.
Scalable photo scroll
/**
* Scalable photo scroll
*/
section {
border: 1px solid #aaa;
width: 600px;
max-width: 100%;
}
#wrap1{
width: 100%;
overflow: hidden;
}
#wrap2{
width: 500%;
}
#wrap2 img {
display: block;
float: left;
width: 20%;
max-width: 20%;
}
<section>
<div id="wrap1">
<div id="wrap2">
<img src="http://placekitten.com/200/200" />
<img src="http://placekitten.com/200/200" />
<img src="http://placekitten.com/200/200" />
<img src="http://placekitten.com/200/200" />
<img src="http://placekitten.com/200/200" />
</div>
</div>
</section>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment