Center Button in Toolbar

UI Components for JSF
Post Reply
MartinSchlesier
Posts: 7
Joined: 28 Mar 2017, 08:10

24 Apr 2017, 12:06

Is it possible to center a button in a toolbar?
I tried <f:facet name="center"> but it is not showing the button. Only "left" and "right" is possible".
And <p:toolbar style="text-align: center;"> is also not working.
Martin Schlesier
______________________________
PrimeFaces 6.1/6.2
Mojarra 2.1.18-jbossorg-1
Bootsfaces 1.0.2
JBoss 7.2.0/WildFly 9.0.2

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

24 Apr 2017, 14:23

Look at the generated html and work from that.

MartinSchlesier
Posts: 7
Joined: 28 Mar 2017, 08:10

24 Apr 2017, 14:56

I didn´t found a solution for p-toolbar and f-facet, but when i put my command-button in a simple div with class (from generated html) and style, the result is that what i want!

Code: Select all

<div class="ui-toolbar ui-widget ui-widget-header ui-corner-all ui-helper-clearfix" style="text-align: center;">
	<p:commandButton
	...
Martin Schlesier
______________________________
PrimeFaces 6.1/6.2
Mojarra 2.1.18-jbossorg-1
Bootsfaces 1.0.2
JBoss 7.2.0/WildFly 9.0.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests