Limit the td in table for dynamic table
Hello,
I am storing avatar images in a table dynamically.
I want to store only 2 avatars in a row, but there may exists any no of avatars. Also in the view i want only to show 3 rows. The remaining must be hidden. When i click some button i want the other 3 rows to be showed and so on.
Is that really possible? Thankyou
Re: Limit the td in table for dynamic table
hi, this works for me. But ineed some changes here. I set the overflow to be hidden. Then i place 2 buttons, when i press the rightbutton the 3&4 div must be show and when leftbutton 1&2 button to be shown. Is that possible?
Code:
<html>
<body>
<head>
<style type="text/css">
#div1
{
float: left;
overflow: auto;
width: 7.5em;
height: 7em;
background-color: red;
vertical-align: top;
}
#subdiv1,#subdiv2,#subdiv3,#subdiv4
{
float:left;
background-color: green;
width: 50px;
height: 75px;
}
</style>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td id="div1">
<table border="1" cellpadding="0" cellspacing="5">
<tr>
<td><div id="subdiv1">1</div></td>
<td><div id="subdiv2">2</div></td>
<td><div id="subdiv3">3</div></td>
<td><div id="subdiv4">4</div></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Re: Limit the td in table for dynamic table
Yes, it is possible I remember seeing an example about how to hide and show divs. Do a search in google for "Hide/Show divs" or something similar. I have forgotten where I saw the example I came across.
Re: Limit the td in table for dynamic table
Quote:
Originally Posted by
Nightwalker83
Yes, it is possible I remember seeing an example about how to hide and show divs. Do a search in google for "Hide/Show divs" or something similar. I have forgotten where I saw the example I came across.
I think what you are saying is possible for limited number of div's. But i will be having unlimited number of avatars and so there are many div's. Is that possible here now?
Re: Limit the td in table for dynamic table
Sounds like you want a slideshow/photo gallery.
JQuery has some nice ones: http://blueprintds.com/2009/01/20/to...llery-plugins/
Re: Limit the td in table for dynamic table
[QUOTE=kfcSmitty;3724591]Sounds like you want a slideshow/photo gallery.
Ya i need not exactly want a slideshow, but am going to dealing with photos. I want to show the friends avatar of the corresponding user. It may end up for the users with his/her friends.
Re: Limit the td in table for dynamic table
Quote:
Originally Posted by
bharanidharanit
I think what you are saying is possible for limited number of div's. But i will be having unlimited number of avatars and so there are many div's. Is that possible here now?
Not sure! You could try kfcSmitty's suggestion first and see if that works if not search hide/show multiple divs.