I am making an ASP.NET web control. In a table, how can I center a b开发者_如何学运维utton?
Thanks
If you want to center an inline element set the container to:
text-align:center; eg:
<div style="text-align:center;"><input type="submit" value="Center Me!"></div>
If you want to center a block level element set it to:
margin:auto; eg:
<div style="margin:auto;">Im in the middle</div>
Easiest way is to put
<td align="center">
--content here--
</td>
This is very simple ..
<div>
//your html code ..
<table>
//data inside the table ..
<button align="center"> Click here </button>
</table>
</div>
精彩评论