Welcome to WebmasterWorld Guest from 54.196.144.242

Forum Moderators: incrediBILL

Message Too Old, No Replies

Horizontal Scrolling <div>

     
10:04 pm on Mar 20, 2010 (gmt 0)

Junior Member

5+ Year Member Top Contributors Of The Month

joined:Mar 1, 2010
posts: 194
votes: 0


Hi,

How can I create a row of images with a horizontal scrollbar?


I'd be really grateful to your help!

Regards
Rain Lover
10:51 pm on Mar 20, 2010 (gmt 0)

Administrator from US 

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 25, 2005
posts:14650
votes: 94


One simple method would be to use an iFrame and just put all the images on a 2nd page displayed in the iFrame.
11:32 am on Mar 21, 2010 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 2, 2003
posts: 970
votes: 23


Hi there Rain_Lover,

I, personally, would avoid the use of the iframe element. ;)

Here is an example of it's non-use. :)


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">

<title>horizontally scrolling box</title>

<style type="text/css">
body {
background-color:#555;
}
#container {
width:850px;
height:216px;
border-style:solid;
border-width:5px;
border-color:#333 #777 #777 #333;;
margin:100px auto 0;
overflow:auto;
}
#content {
width:1680px;
padding:10px 0 10px 10px;
height:180px;
background-color:#fff;
}
#content img {
float:left;
width:198px;
height:178px;
border:1px solid #000;
margin-right:10px;
background-color:#ccc;
}
</style>

</head>
<body>

<div id="container">

<div id="content">
<img src="some.jpg" alt="">
<img src="some.jpg" alt="">
<img src="some.jpg" alt="">
<img src="some.jpg" alt="">
<img src="some.jpg" alt="">
<img src="some.jpg" alt="">
<img src="some.jpg" alt="">
<img src="some.jpg" alt="">
</div>

</div><!--end #container -->

</body>
</html>


birdbrain
2:10 pm on Mar 21, 2010 (gmt 0)

Junior Member

5+ Year Member Top Contributors Of The Month

joined:Mar 1, 2010
posts: 194
votes: 0


@ birdbrain,

Thanks for the answer!


@ incrediBILL,

I can't get it to work through an iframe. Would you please give an example or provide a sample code?
4:31 am on Apr 3, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 15, 2010
posts:57
votes: 0


Could you please elaborate on how it is done with iframe.