Hello All,
I'm using Ultima license. I'd like to apply styleClass for splitButton as
<p:splitButton value="XYZ" styleClass="secondary">
But it appears it doesn't not work. SplitButton still have 'default' color. Please advice.
Thanks,
Nghia
SplitButton with StyleClass
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.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
We use secondary or other color class for only buttons. Therefore, you can override color of splitButton. If you use blue color on theme, please try;
Code: Select all
<style type="text/css">
body .secondary .ui-button {
background-color: #e91e63;
color: #ffffff;
}
body .secondary .ui-button.ui-state-hover {
background-color: #ad1457;
}
body .secondary .ui-button.ui-state-focus {
background-color: #ee4c83;
outline: 0 none;
}
</style>
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
We designed these css classes for buttons. It is by design. I'll talk about this issue with our other team members and get back to you.
Github Profile: https://github.com/mertsincan
Hi,
I have a similar problem! How to set the styleClass for the menuItem of a splitButton?
Using the approach show by mert does not work!
I have a similar problem! How to set the styleClass for the menuItem of a splitButton?
Using the approach show by mert does not work!
Code: Select all
<p:splitButton ....>
<p:menuItem styleClass="secondary" ... />
</p:splitButton>
PF 12.0.4
WildFly 23.0.2.Final
WildFly 23.0.2.Final
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
You need to use button classes on SplitButton tag. For the menuitems, you need to write custom styles according to your needs.
Best Regards,
You need to use button classes on SplitButton tag. For the menuitems, you need to write custom styles according to your needs.
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
You're welcome!
Best Regards,
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest