I would like to know how to put a textbox inside a table cell or <TD>
and make it so the textbox's width and height is the same as the table cell so there's no visible margins or white space around the textbox.
I tried this on the website I'm trying to make but it messed things up, now my table doesn't have any borders visible. I'm just trying to make a php version of excel so my users can edit set/batch of records at once.
This is what my webpage shows:
and this is what I want to copy, the excel cell characteristic wherein there's no spaces between cells or if there is then make it very thin.
the code I have which may be affecting this is:
echo "<style type='text/css'>
.bordmargset{
border:none;
width:100%;
height:100%;
}
</style>";
echo "<table border='1' style='width:100%; font-family:arial,Serif;font-style:regular;font-size:12px; color:black' CELLPADDING='0' CELLSPACING='0'>
<tr>
<th>Property Case</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Zip Code</th>
<th>County</th>
<th>Price</th>
<th>Bed</th>
<th>Bath</th>
<th>Square Foot</th>
<th>Year Built</th>
<th>As Is Value</th>
<th>Hud Type</th>
<th>Main Type</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr onclick='mclick(this)' onmouseover='mover(this)' onmouseout='mout(this)'>";
echo "<td class='bordmargset'><input style='border:none;background-color:transparent;' type='text' value='" . $row['Property Case'] . "'></td>";
echo "<td class='bordmargset'><input type='text' value='" . $row['Address'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['City'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['State'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['Zip Code'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['County'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['Price'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['Bed'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['Bath'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['Square Foot'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['Year Built'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['As Is Value'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['Hud Type'] . "'></td>";
echo "<td style='border:0;padding:0;margin:0;'><input type='text' value='" . $row['Main Type'] . "'></td>";
echo "</tr>";
}
echo "</table><br>";