PDA

View Full Version : DIV with auto expanding width dependent on content


cheska
02-03-2008, 11:05 PM
Hi : )

On this page here : http://lucid-life.com/lucid_sites/test/test.html , you will see i have a div which scrolls the content. The intention is to actually only have it scroll horizontally, and not vertically. However, it contains a table, which contains images.

I want to eventually find a way for my client to upload images (numbered 1.jpg upwards*), and the table (or just the div) will expand width-wise to contain the content. The images float left, so should always be horizontal, but for now, unless I define the width of the table to be wide enough for all the contained images, the images obviously wrap within the div, and a vertical scrollbar appears.

The problem is, since i won't know the width of al the images it will eventually contain, i can't declare the width. I thought of possibly setting a ridiculously long width, but then the problem will be that the div scrolls a large amount of empty content at the end (after the images), and that's undesirable.

I fear i've probably done an awful job of explaining my problem, but if you are at all inclined to delve a little further, all the css is in the actual page... I'll be grateful of anyone's advice/input.

Thanks,

Cesca



* since i don't know PHP or anything regarding dynamic web building, i was going to enter about 20 images in my table, labeled 1.jpg, 2.jpg etc etc, without declared widths or heights, and then just set up an FTP client on my client's computer, and have them be able to change the images on the fly when they need to. Can anyone recommend a better solution that i may be able to get my head around?....