Click to See Complete Forum and Search --> : <table> <div> ?
robertbarzyk
12-03-2009, 02:39 PM
i have a table within a div
the div is set to width:700px
the problem is the table exceeds the width of the div
so how can i keep it inside the div?
CFHutton
12-03-2009, 04:30 PM
Lots of possible answers to your question, but a little more info would be helpful to narrow down the possible options.
The obvious answers:
1. Make the table smaller.
2. Make the div larger.
Since one can assume those aren't sufficient, you might could consider using a 'thumbnail' size picture of the table that has a 'click to enlarge' link below it, which, when clicked, opens a 'lightbox' type popup to display the table at full size.
Also, the overflow property can be used to make the div scrollable, but that rarely seems like a good answer...
cfh
robertbarzyk
12-03-2009, 04:51 PM
well there is more to the problem which i forgot to state before
the table is coming from php
this isnt the actual code but just an example
echo "<table>";
$num=1;
echo "<tr><td>";
while($num<100){ echo '<img src="image.jpg" height="75px" width="75px">';
$i++
}
echo "</table>"; ?>
what i want to do is after the while loop executed 9 times i want it to go to the next line.
CFHutton
12-04-2009, 07:07 AM
I'd suggest trying the php forum. I might could cobble something together but without the ability to test it, it would be an embarrassing display :)
cfh