3

I've recently added Primefaces to my WEb app in order to use it's dataTable UI. So I decided to go and up the font size of the dataTable to 12px instead of the default 10px it comes with. so I added this to my Css:

.ui-widget,         .ui-widget .ui-widget {                
font-size: 12px !important;          
}

Anyway, I was also using a button with the styleclass="button" which comes from the jquery.ui and now it's affected that style as well to a 12px font, but I wanted to keep the button font to 10px.

Is there a way to fix the font size for just the button? or do I have to add something to the above code to make it just affect the dataTable?

The button looks like this:

<h:commandButton id="auditButton" action="#{auditBB.actionSearch}" styleClass="button"  value="Search"></h:commandButton>
0

1 Answer 1

10

It took me a while to find it, but I found this Stack Overflow Question and it has a few answers on it. the one I used to solve my issue was to add the following code into my Css.

.ui-button,  .ui-button-text .ui-button{  
font-size: 10px !important; 
}

That took care of it, Thanksfor reading. I hope this helps somebody. =)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.