Trying to center align button in td

I found that I had to combine the following attributes to center JSF controls on a page:

<h:form style="display: block; text-align: center; margin: auto; width: 200px">
<!-- components here -->
</h:form>

As I said in my comment above simply change the TD to have the align="center" property.

<td align="center"></td>

Since posting this I've discovered that this is deprecated in HTML5 so best just to use "text-align: center" on the TD in your CSS>


This worked for me

<td style="text-align: center">


You can use :

display: block;
margin: auto;

Here is your updated plunkr