Will
Will

Reputation: 75625

Scrollable container in webpage

I want to create a viewport inside a webpage with scrollbars.

In this viewport I want to place a collage of images at arbitrary offsets relative to each other.

The first image I add should be centred in the viewport. It may not be as big as the viewport.

As other images are added over time, they are some polar coordinates from some other image. I can turn polar coordinates into X Y offsets.

As I add images, I may want them to be left of all other images or above all other images and so on; can I use negative offsets? Can the scrollbars on the viewport scroll over the used coordinate range of the children automatically, rather than being from 0,0?

What container class with which CSS settings do I use for the viewport? What CSS position settings do I use to position the children?

Upvotes: 6

Views: 34912

Answers (1)

maximumcallstack
maximumcallstack

Reputation: 2917

To make a div or block element scroll able use the overflow property: http://www.w3schools.com/cssref/tryit.asp?filename=trycss_overflow

For positioning, and size check this out: http://www.wickham43.net/divboxes.php

Here's a CSS collage gallery i googled in 1 second. http://www.entheosweb.com/tutorials/css/collage_gallery.asp#.T42Z06uXQ_Q

(Your question isn't specific, if the above doesn't help please edit)

Upvotes: 12

Related Questions