[thelist] CSS help this time...

Ben Glassman bglassman at gmail.com
Tue Nov 27 10:02:01 CST 2007


On Nov 27, 2007 10:57 AM, Dan Parry <dan at virtuawebtech.co.uk> wrote:

> > -----Original Message-----
> > From: thelist-bounces at lists.evolt.org [mailto:thelist-
> > bounces at lists.evolt.org] On Behalf Of Ben Glassman
> > Sent: 27 November 2007 15:51
> > To: thelist at lists.evolt.org
> > Subject: Re: [thelist] CSS help this time...
> >
> > On Nov 27, 2007 10:44 AM, Dan Parry <dan at virtuawebtech.co.uk> wrote:
> >
> > > I've set up a div that is
> > > 2000px wide but clipped to 550px (there's going to be some JS
> > wizadry,
> > > theoretically)
> > >
> > > Problem is this introduces scrollbars into the page to reflect the
> > clipped
> > > area
> > >
> >
> > Why not specify css rules of "width: 550px; overflow: hidden" on the
> > div
> > rather than using JS. This will allow you to put content of any width
> > into
> > the div without causing scrollbars in your browser. Any content outside
> > of
> > the 550 pixels of width you specify will be clipped off.
>
> This was my initial thought but ideally I want users to be able to scroll
> the content left and right
>
> The content is up to 12 thumbnail images
>
>
You could use overflow: auto (or scroll to force scrollbars always) to have
the browser add scrollbars to the div (not the entire site) if the content
is wider than the 550px width that you specify.

Ben



More information about the thelist mailing list