Sarz Sarz - 11 months ago 71
Java Question

How can we adjust p:commandbutton size or width

My working environment is: Primefaces 4.0 with JSF 2.0
My aim is to set width of command button same in the form. I find

to set button's font size which is changing button's label size. I want to change button's size

Answer Source

You can use the style attribute in the commandButton with the css properties width and height.

<p:commandButton id="button" value="Click"                              

To set the same value for all the commandButtons on a page,add the following css to your jsf page.