Jump to content

how to display images inline with inside a div with a scroll


Recommended Posts

Hi i am trying to have image with scroll bar i do not want to set the size of div inside because if i set a size the scroll bar will just scroll empty space so i am trying to set size 100% so it sets automatically but with the div with 100% scroll bar doesnt show. help please

<div style="background-color:red; width:300px; height:200px; overflow:scroll; overflow-x: scroll; overflow-y: hidden;">
<div style="width:100%;">
<div class="img">
<a target="_blank" href="klematis_big.htm"><img src="klematis_small.jpg" alt="Klematis" width="110" height="90" /></a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="img">
<a target="_blank" href="klematis2_big.htm"><img src="klematis2_small.jpg" alt="Klematis" width="110" height="90" /></a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="img">
<a target="_blank" href="klematis2_big.htm"><img src="klematis2_small.jpg" alt="Klematis" width="110" height="90" /></a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="img">
<a target="_blank" href="klematis4_big.htm"><img src="klematis4_small.jpg" alt="Klematis" width="110" height="90" /></a>
<div class="desc">Add a description of the image here</div>

</div>
</div>
</div>

Not completely sure what you mean, but take a look at this and see if it's close:

<style type="text/css">
.img
{
border: green solid 1px;
//width: 300px;
float:left;
}
</style>

<body>

<div style="background-color:red; width:300px; height:200px; overflow:scroll; overflow-y: scroll; overflow-y: hidden;">
<div style="width:3000px;">
<div style="width:100%;">
	<div class="img">
	 <a target="_blank" href="klematis_big.htm"><img src="klematis_small.jpg" alt="Klematis" width="110" height="90" /></a>
	 <div class="desc">Add a description of the image here</div>
	</div>

	<div class="img">
	 <a target="_blank" href="klematis2_big.htm"><img src="klematis2_small.jpg" alt="Klematis" width="110" height="90" /></a>
	 <div class="desc">Add a description of the image here</div>
	</div>

	<div class="img">
	 <a target="_blank" href="klematis2_big.htm"><img src="klematis2_small.jpg" alt="Klematis" width="110" height="90" /></a>
	 <div class="desc">Add a description of the image here</div>
	</div>

	<div class="img">
	 <a target="_blank" href="klematis4_big.htm"><img src="klematis4_small.jpg" alt="Klematis" width="110" height="90" /></a>
	 <div class="desc">Add a description of the image here</div>
	</div>
</div>
</div>
</div>

</body>

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.