I'm working on placing a row of panoramic images inside my iPad hybrid app. Basically, all I need is for the user to be able to scroll sideways through a row of four or five images while keeping the rest of the site stationary. Apparently, this is possible just by placing images inside a div and setting overflow to "auto."
I can't seem to get it to work, my images always show up one beneath the other instead of in a row. Here is my code so far:
CSS
div.scroll {
height: 1024px;
width: 768px;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
HTML
<div class="scroll">
<img src="images/image-1.jpg"/>
<img src="images/image-2.jpg"/>
<img src="images/image-3.jpg"/>
</div>
I saw somewhere that it might have to do with the display property, inline vs. block, but I can't figure that part out either. Any help would be appreciated.
I can't seem to get it to work, my images always show up one beneath the other instead of in a row. Here is my code so far:
CSS
div.scroll {
height: 1024px;
width: 768px;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
HTML
<div class="scroll">
<img src="images/image-1.jpg"/>
<img src="images/image-2.jpg"/>
<img src="images/image-3.jpg"/>
</div>
I saw somewhere that it might have to do with the display property, inline vs. block, but I can't figure that part out either. Any help would be appreciated.
Last edited: