Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 884
Will Avatar asked Apr 14 '12 21:04

Will


People also ask

How do you make a scrollable container in HTML?

For vertical scrollable bar use the x and y axis. Set the overflow-x:hidden; and overflow-y:auto; that will automatically hide the horizontal scroll bar and present only vertical scrollbar. Here the scroll div will be vertically scrollable.

How do I add a scrollbar to my website?

Suppose we want to add a scroll bar option in HTML, use an “overflow” option and set it as auto-enabled for adding both horizontal and vertical scroll bars. If we want to add a vertical bar option in Html, add the line “overflow-y” in the files.

How do I create a horizontal scrolling container?

For horizontal scrollable bar use the x and y-axis. Set the overflow-y: hidden; and overflow-x: auto; that will automatically hide the vertical scroll bar and present only the horizontal scrollbar. The white-space: nowrap; property is used to wrap text in a single line.


1 Answers

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)

like image 54
frontsideup Avatar answered Oct 26 '22 11:10

frontsideup