Previous Message
Next Message

Re: [css-d] Clipped horizontal scrolling Div

Sent by Richard Grevers on 5 May 2003 22:10


On Mon, 05 May 2003 22:06:31 +1200, Richard Grevers [EMAIL-REMOVED]> 
gave utterance to the following:

> I am writing a static version of a photo gallery to go on CD, and since 
> bandwidth is not an issue I'd like to have a horizontal scroller with all 
> the thumbnails in a category on each page.
> I made a div with ample width (3000pix) and floated all the thumbnails 
> left in it.
>
> But from what I can make of the spec, the values for clip refer to the 
> element borders rather than the containing element, and I'm just ending 
> up with a very wide page so far.
>
> Can anyone show me how to clip a div to the viewport?
>
Thanks to those who answered. Clip, of course, was not necessary at all.
What worked was:

..thumbwrapper {width:100%;  overflow: scroll;}
..thumbscroller {width: 3000px; background:#ffcc00;}
..thumbscroller img {float:left;}

<div class="thumbwrapper">
  <div class="thumbscroller">
    <img ...><img ...>...
  </div>
</div>

No javascript required, and given the nature of the distribution, supported 
in enough browsers. -- Richard Grevers
When all else fails put the blame on someone else



______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: