Hello Primefaces Community,
I am using Rain and have the requirement to right-align the text of my labels.
So as shown in the demo page of the formlayout (https://primefaces.org/rain/formlayout.xhtml) I want that the labels in the Horizonatal example are right-aligned.
I know that I can use panelGrid (which renders html tables) to get right-aligned label text, but is panelGrid recommended to achieve this?
Regards, Rainer
Formlayout Label align right
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
Hi,
You can use "p-justify-end" styleClass for right aligned items. For example:
Best Regards,
You can use "p-justify-end" styleClass for right aligned items. For example:
Code: Select all
<div class="card ui-fluid">
<h5>Horizontal</h5>
<div class="p-field p-grid">
<p:outputLabel for="name3" styleClass="p-col-12 p-mb-2 p-md-2 p-mb-md-0 p-justify-end">Name</p:outputLabel>
<div class="p-col-12 p-md-10">
<p:inputText id="name3" />
</div>
</div>
<div class="p-field p-grid ">
<p:outputLabel for="email3" styleClass="p-col-12 p-mb-2 p-md-2 p-mb-md-0 p-justify-end">Email</p:outputLabel>
<div class="p-col-12 p-md-10">
<p:inputText id="email3" />
</div>
</div>
</div>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 11 guests