...

View Full Version : Can I add scrolling to this div box ?



jeddi
02-16-2009, 10:14 PM
Hello,
I have got a div box that is filled up with output from an mysql table and
anymore and it will start printing outside the box.

Here is an image to show you what I mean:

http://www.expert-world.com/im/test/fuldiv.jpg

Is there any way I can add scrolling so that the next rows do not print outside the box ?

This is my code:



<div class="out_box cont01">
<span class="hot02">My Tutorials</span>
<div class="in_box cont03">
<div class="hot04">
<p style="font-size: 10pt;">
<?php
DO THE SQL QUERY

echo "<span style =\"color:$colr;\">$ctr) $D_tute_hd &nbsp;&nbsp</span><a href=\"$link\">edit</a><br>";
</p>
</div> <!-- End div:hot04 -->
</div> <!-- End div:hot03 -->
</div> <!-- End div:hot01 -->


AND THE CSS



.out_box{
float:left;
text-align: left;
margin: 0 0 0 10px;
}

.hot02{
font-size: 14px;
font-weight: bold;
text-align: left;
}

.in_box{
border: 1px;
border-style: solid;
border-color: #ccc;
float:left;
text-align: left;
margin: 10px;
}

.hot04{
font-size: 12px;
margin: 10px;
}

.cont01{
width:280px;
}

.cont03{
width:260px;
height:300px;
}

I hope there is way to do this :confused:

Thanks :)

Excavator
02-16-2009, 10:53 PM
Hello jeddi,
You can add overflow-y:scroll; to whichever box has the content. The box probably already has a height set on it? It will need one if it doesn't.

Try this:
.hot04{
height: 300px;
overflow-y: scroll;
font-size: 12px;
margin: 10px;
}

jeddi
02-17-2009, 12:42 AM
Thanks a lot :thumbsup:

In fact I needed to put it on the ".cont03"
because thats the one that had the hieght on it.

And it worked great ... now I know :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum