user186053
user186053

Reputation:

Horizontal scrolling div with images won't display inline

I'm trying to create a div with a fixed size that contains images only. I'd like them to be the height of the div, display inline, and scroll through them horizontally. I'm having trouble making this work. I'd to do this as simply as possible. What am I missing?

Upvotes: 0

Views: 2924

Answers (2)

bobince
bobince

Reputation: 536379

You would need white-space: nowrap on the element with overflow in order to tell it that it shouldn't treat separate images as word-wrappable.

Upvotes: 2

Brendan Long
Brendan Long

Reputation: 54242

Set overflow:scroll, width and height on the div, set the images to display:inline height:100% (or maybe float:left).

Upvotes: 0

Related Questions