I'm using the following CSS to display images side by side:
#gallery {
background-color: #444;
padding: 10px;
width: 520px;
}
#gallery ul { list-style: none; }
#gallery ul li { display: inline; }
#gallery ul img {
border: 5px solid #3e3e3e;
border-width: 5px 5px 20px;
}
#gallery ul a:hover img {
border: 5px solid #fff;
border-width: 5px 5px 20px;
color: #fff;
}
#gallery ul a:hover { color: #fff; }
html code for above css is:
<div id="gallery">
<ul>
<li>
<a href="photos/image1.jpg" title="">
<img src="photos/thumb_image1.jpg"/>
</a>
</li>
<li>
<a href="photos/image2.jpg" title="">
<img src="photos/thumb_image2.jpg">
</a>
</li>
</div>
All works fine, but there might be cases when I will be displaying 20 to 30 images which makes the page very long. Is there a way to add all this in side something so that the whole page doesnt become big and a scroll bar is added around the container that contains all the images?