Sarz Sarz - 3 years ago 148
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download