Primefaces styling component class with CSS

后端 未结 3 2016
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 01:11

How can I change properties of component using CSS?

Let\'s say I have two buttons:



        
3条回答
  •  情话喂你
    2021-01-03 01:55

    PrimeFaces overrides your css with the default rules for the parent form.

    You can define your css for the form like this:

    form .smallButton{
       font-size:11px;
    }
    

    or you can use the !important keyword:

    .smallButton{
       font-size:11px !important;
    }
    

    See also:

    • PrimeFaces: how to override CSS class
    • PrimeFaces overrides my custom CSS style

提交回复
热议问题