Forum Moderators: open

Message Too Old, No Replies

trying to center a submit button in a table cell

         

chuckee

8:36 am on Mar 27, 2008 (gmt 0)

10+ Year Member



Hi,
I have the following code, which produces a submit button that is not centered horizontally nor vertically. I want it to be centered within its table cell.
Here is the code:

<table border="1">
<tr><td>Some text</td><td>More text</td></tr>
<tr><td>Some text</td><td><form name="form1" method="post">
<input type="hidden" name="action" value="sendrefund">
<input type="hidden" name="refund_id" value="50">
<input type="submit" name="Submit" value="Refund Sent"></form></td>
</tr>
</table>

Any thoughts?

SuzyUK

9:08 am on Mar 27, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



via CSS:
form {margin: 0; text-align: center;}

or inline:

<form name="form1" method="post" style="margin: 0; text-align: center;">

chuckee

10:11 am on Mar 27, 2008 (gmt 0)

10+ Year Member



Thank you so much SuzyUK - that saved me a big headache!