Hi and sorry for my english...i've a datatable with a command button on footer, and i don't be able to align the command button...
i've tried with style="align: right" or style="position= right", but the button is ever align in the center of datatable.
Anyone can help me?
Thanks
How align commandbutton?
- kwintesencja
- Posts: 316
- Joined: 08 Feb 2010, 20:33
- Location: Brazil
you have some options, the ones i remember now:
surround the button with a div:
use table:
use float property:
i hope it helps
surround the button with a div:
Code: Select all
<div align="right">
<button/>
</div>
Code: Select all
<table>
<tr>
<td align="right"> //almost sure you can use td directly
<button>
</td>
</tr>
</table>
Code: Select all
<p:commandButton style="float="right"/>'
i hope it helps
Att,
--
Rafael Mauricio Pestano
Primefaces 5.x + JavaEE7(Glassfish 4.x and Wildfly 8)
Conventions Framework
Blog
@realpestano
--
Rafael Mauricio Pestano
Primefaces 5.x + JavaEE7(Glassfish 4.x and Wildfly 8)
Conventions Framework
Blog
@realpestano
Just fixing a typo in kwintesencja's answer:
I would definitely recommend using this option, rather than sticking HTML tables and divs directly into facelet code, as it often leads to unpredictable rendering errors when updating with ajax and the like.
If you feel the need for surrounding elements, use p:outputPanel, or h:panelGrid, or any other suitable JSF component instead.
Code: Select all
<p:commandButton style="float:right;"/>
If you feel the need for surrounding elements, use p:outputPanel, or h:panelGrid, or any other suitable JSF component instead.
-------
PrimeFaces 3.4, Glassfish 3.1.2, Mojarra 2.1.6
PrimeFaces 3.4, Glassfish 3.1.2, Mojarra 2.1.6
-
- Posts: 1
- Joined: 27 Apr 2016, 09:55
HTML tables and divs directly into facelet code, as it often leads to unpredictable rendering errors when updating with ajax and the like.
=== www.chess-rivals.com ===
-
- Information
-
Who is online
Users browsing this forum: No registered users and 22 guests