How to change component properties using CSS?
Say I have two buttons:
<p:commandButton id="mySmallButton" styleClass="smallButton">
<p:commandButton id="myButton">
I want all my buttons to have font-size: 14px;, so I added this rule:
.ui-button .ui-button-text{
font-size:14px;
}
But my smallButton should have a different size, so I added:
.smallButton{
font-size:11px;
}
Unfortunately this will not work. This is created by HTML:
<button class="ui-button ui-widget ui-state-default ui-corner-all
ui-button-text-only smallButton" (...)>
<span class="ui-button-text ui-c">MY TEXT</span>
</button>
The text of this button is 14px. How does CSS look like to have all my smallButton font-size: 11px ?
source
share