Table Wrapping
Posted: Wed Jul 16, 2003 5:01 pm
Hi There,
Does any one know how to wrap tables? What I want this to do is basicly have a bunch of tables beside each other depending on the size of the browser window wrap them down to the next line.
Heres a simple example.
For the above I just want it second table to drop down to the next line if shrink your browser window.
Heres the more complex example of my acutal code.
Sincerley,
Lambert the Old
?>
Does any one know how to wrap tables? What I want this to do is basicly have a bunch of tables beside each other depending on the size of the browser window wrap them down to the next line.
Heres a simple example.
Code: Select all
<html>
<head>
</head>
<body>
<table width="50" border="1" cellspacing="1" cellpadding="1" align="right">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="50" border="1" cellspacing="1" cellpadding="1" align="right">
<tr>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>Heres the more complex example of my acutal code.
Sincerley,
Lambert the Old
Code: Select all
<?php
if ($_SESSION['view_cal'] == 0)
{
$y2 = date("Y");
echo "<h3>Unit: " . $_SESSION['editchoice_view_cal'] . "";
echo "<h3>Calendar Year For: $y2</h3><br>\n";
$counter = 0;
echo "<table width="100%" border="0" cellspacing="0" cellpadding="1">";
echo "<tr>\n";
echo "<td> </td>";
while($counter < 12)
{
if( !$y )
{
$y = date("Y");
}
if( !$m )
{
$m = date("m");
}
$_SESSION['view_cal'] = 0;
$mymonth = new month($m,$y);
echo "<table width="15%" cellpadding="0" cellspacing="0" border="0" align ="right">\n";
echo "<tr>\n";
echo " <td bgcolor="#00cc65">\n";
echo "<h3>$mymonth->month_name</h3><br>\n";
$mymonth->draw(array("cellspacing" => "1" , "cellpadding" => "1" ,
"top_row_align" => "center" ,
"top_row_cell_height" => 1 , "bgcolor" => "#cccccc" ,
"row_align" => "left" , "row_valign" => "top" ,
"font_size" => "-2") );
echo " </td>\n";
echo "</tr>\n";
$counter++;
$m=$mymonth->nextmonth;
$y=$mymonth->nextyear;
}//while
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
//<a href="./cal.php?m=<?php echo $mymonth->prevmonth; &y=<?php echo $mymonth->prevyear; &y2=<? echo $y2 -1 ">Prev.</a>
?>
<p><a href="./cal.php?m=<?php echo $mymonth->prevmonth; ?>&y=<?php echo $mymonth->prevyear; ?>">Prev.</a>
<a href="./cal.php?m=<?php echo $mymonth->nextmonth; ?>&y=<?php echo $mymonth->nextyear; ?>">Next.</a>
</p>
</body>
</html>
<?
echo "<A HREF="../guest_view_unit.php"> BACK TO VIEW UNIT VIEW </A><br>";
}//if
?>