0

One of my pages has a big table that displays info from a database but the data runs down the page so if i were to view data at the bottom i would have to scroll down then I wouldn't be able to see the titles of the data from the top of the page. So i put the table into a scroll box. My problem is that the data is so spread apart in the scroll box. I have no idea why. Here is a copy of my code.

<div style="overflow:auto; height:400px; width:1250px">
<table cellpadding="0" cellspacing="0" style="width:50px;">
<?php
echo "<table border='1'>";
echo "<tr>"; 
echo "<td>" .$row['School'] . "</td>";
echo "<td>" .$row['Teacher'] . "</td>";
if(!strcmp($row['dtFirstContactSt'], '0000-00-00')) {
echo "<td>" . "No Date </td>";
} else {
echo "<td>" .$row['dtFirstContactSt']. "</td>";
}
if(!strcmp($row['dtDevelopmentSt'], '0000-00-00')) {
echo "<td>" . "No Date </td>";
} else {
echo "<td>" .$row['dtDevelopmentSt']. "</td>";
}
if(!strcmp($row['dtDevelopmentEnd'], '0000-00-00')) {
echo "<td>" . "No Date </td>";
} else {
echo "<td>" .$row['dtDevelopmentEnd']. "</td>";
};
if(!strcmp($row['dtPricingSt'], '0000-00-00')) {
echo "<td>" . "No Date </td>";
} else {
echo "<td>" .$row['dtPricingSt']. "</td>";
}
if(!strcmp($row['dtPricingEnd'], '0000-00-00')) {
echo "<td>" . "No Date </td>";
} else {
echo "<td>" .$row['dtPricingEnd']. "</td>";
}
if(!strcmp($row['dtMarketingSt'], '0000-00-00')) {
echo "<td>" . "No Date </td>";
} else {
echo "<td>" .$row['dtMarketingSt']. "</td>";
}
echo "<td>" .$row['PriceBasedOn']. "</td>";
echo "<td>" .$row['TripAssignedTo']. "</td>"; 
 ?>
<td><input type="checkbox" name="TripMade" value="Yes" <?= $checkbox ?>></td>
<td><textarea name="Notes" rows="1" cols="10"><?php echo $row["Notes"]?></textarea> </td>
<?php
echo "<td>" . "<a href=Edit_Form.php?UniqueIdentifier=$row[UniqueIdentifier]> Edit </a></td>";
echo "</tr>";
}
echo "</table>";
echo "</div>";
5
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by macgurl70
0

Are your table/div echo commands within a while statement?

Edited by macneato: n/a

0

for web design we must choose table less design concept for it. by this we can reduce our website loading time.

0

Wow, the div is set really wide - have you tried to reduce the size for the div? The table could be expanding to fill that space.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.