| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) | |
|
Senior Member
Join Date: Feb 2007
Location: Stoke on Trent
Posts: 493
|
Horizontal Scroll - Help!!!
Guys... help me!! I'm building a website and I want a div container which will have a horizontal scroll. I intend to put in this container portfolio images and want it to stretch to accomodate these images. This is an example of what I want - but only mine contains images rather than text. BLUE VERTIGO | Web Design Resources Links | Last update SEP.15.2007 So far I have managed to get my images side by side in it's container... however it expand the entire browser window width with a horizontal scroll. I only want a horizontal scroll for that container. My Html.... Quote:
Anyone got any suggestions? Please forgive me if I've done my CSS completely wrong. |
|
|
|
|
|
|
#2 (permalink) |
|
Senior Member
|
You need to set the container div to be width you want the box to be displayed. Then create another div and nest it within the container, set the width of this one as 4400px or whatever you want. Make sure you specify overflow:auto for the container but you don't have to bother writing overflow-y:hidden it does it automatically. Code:
|
|
|
|
#3 (permalink) | ||
|
Senior Member
Join Date: Feb 2007
Location: Stoke on Trent
Posts: 493
|
Thanks Bazzle... I'm much closer but it isn't quite right. My images are now contained properly in the div but it's flowing vertical now with a vertical scroll. I need it to be horizontal. Any other suggestion? I don't stand why it's doing that even though I've specified a height. My new codes... Quote:
Quote:
|
||
|
|
|
#7 (permalink) | |||
|
Senior Member
Join Date: Feb 2007
Location: Stoke on Trent
Posts: 493
|
Quote:
Bazzle, the height of all my images are 482px and varies in width. I made the content div really wide to accommodate whatever I put in there hoping the container will expand automatically. I will post my entire revised html and css tonight (at work at the mo) Quote:
Quote:
Do you mean... <div id="container"> </div> <div id="content"> <img src="1.jpg"/><img src="2.jpg"/><img src="3.jpg"/><img src="4.jpg"/><img src="5.jpg"/> </div> |
|||
|
|
|
#8 (permalink) |
|
Senior Member
Join Date: Feb 2007
Location: Stoke on Trent
Posts: 493
|
AHA!!! I've sussed it out! I accidently deleted the } at the end of the container in my css stylesheet! Nearly there folks! The next bit is... the div now stretch to 3870px wide which isn't what I want as it leaves a load of white space after my last image. 3870px is the maximum I need it to stretch with it being an external style sheet. This style sheet will be used for about 10 html page/projects. Is there anyway of making the 3870px a maximum so that the div automatically stretch? Last edited by Mandy Moo : 17-09-2007 at 14:42. |
|
![]() |