I am looking to create a grid filled with numerous photos in a row. However, due to the limited width of the web page, I need to implement horizontal scrolling.
Check out my solution here: http://jsfiddle.net/49REZ/
HTML
<div class="wrapper">
<div class="photos">
<ul>
<li><img src="http://photos-ak.sparkpeople.com/nw/4/4/l446472527.jpg"/></li>
<li><img src="http://photos-ak.sparkpeople.com/nw/4/4/l446472527.jpg"/></li>
<li><img src="http://photos-ak.sparkpeople.com/nw/4/4/l446472527.jpg"/></li>
<li><img src="http://photos-ak.sparkpeople.com/nw/4/4/l446472527.jpg"/></li>
</ul>
</div>
</div>
CSS
.wrapper {
width: 80%;
margin: 10px auto;
}
.wrapper {
overflow-x: scroll;
overflow-y: hidden;
}
ul, li {
margin: 0;
padding: 0;
}
.wrapper ul {
width: 10000px;
}
ul li {
list-style: none;
float: left;
}
While this setup works smoothly in Chrome, it encounters an issue in Firefox where the block extends too far beyond the photos, leaving excessive white space.