Reputation: 10460
I have this HTML ...
<p align='center'>
<table width='100%'>
<tr>
<td align='center'><form><input type=submit value="click me"></form></td>
</tr>
</table>
</p>
... which results in a table and button that looks like this ...
... which is fine, but how would I make the button fill the entire cell?
Thanks!
Upvotes: 30
Views: 131874
Reputation: 726
For starters:
<p align='center'>
<table width='100%'>
<tr>
<td align='center'>
<form>
<input type=submit value="click me" style="width:100%">
</form>
</td>
</tr>
</table>
</p>
Note, if the width of the input button is 100%, you wont need the attribute "align='center'" anymore.
This would be the optimal solution:
<p align='center'>
<table width='100%'>
<tr>
<td>
<form>
<input type=submit value="click me" style="width:100%">
</form>
</td>
</tr>
</table>
</p>
Upvotes: 33