Can a DIV scroll right, to show image, but not down?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Can a DIV scroll right, to show image, but not down?

Post by simonmlewis »

I need to have a scroll box that shows large images.
These images will be shown on mobile only. so it needs to automatically a) fit the screen both height and width, and B, have the images in the DIV, auto fill the width of the screen (thus the height of the DIV should be the height of the image - whatever height it is on the device).

I then want the images - rather than scroll down, with an up/down scroll, to scroll right/left, so it goes off the page to the right.

However, having tried this, a) I cannot get it to go to the right, and b) I don't know how to set the DIV so it's not too wide. ie. don't set the div to 1000PX if only 2x 300px wide images are there.

This is a good way I can see to do a touchscreen swipe of images, left right.

Any good CSS options?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply