How to align td elements in center
Give a style inside the <td>
element or in your CSS file, like this: vertical-align: middle;
What worked for me is the following (in view of the confusion in other answers):
<td style="text-align:center;">
<input type="radio" name="ageneral" value="male">
</td>
The proposed solution (text-align
) works but must be used in a style attribute.
margin:auto;
text-align, if this won't work - try adding display:block;
and set there width:200px;
(in case your TD is too small).
It should be text-align
, not align
https://developer.mozilla.org/en/CSS/text-align