Welcome to WebmasterWorld Guest from 54.144.243.34

Forum Moderators: incrediBILL

Horizontal Scrolling <div>

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

5+ Year Member Top Contributors Of The Month



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)

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



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)

WebmasterWorld Senior Member 10+ Year Member



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)

5+ Year Member Top Contributors Of The Month



@ 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)

5+ Year Member



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

Featured Threads

Hot Threads This Week

Hot Threads This Month