Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom icon for menu item on prime faces

Tags:

jsf

primefaces

I have to add customized icon for menu item. please any one suggest me? I have set the icon using CSS class but am not getting displaying.

<p:submenu label="Administration" >
    <p:menuitem value="Role Master" url="/secured/role_master.xhtml?redirect=true" />
    <p:menuitem value="Role Assignment" url="#" />
    <p:menuitem value="User Management" url="/secured/users.xhtml?redirect=true" icon="user"/>
</p:submenu>

and below code represent css class

.user{
    background: url('resources/images/menu/users.png') no-repeat;
    height:16px;
    width:16px;
}
like image 400
Uday Avatar asked Nov 02 '22 16:11

Uday


1 Answers

try this:

.user{
    background-image: url('resources/images/menu/users.png') !important;
    height:16px;
    width:16px;
}
like image 166
John Taylor Avatar answered Nov 15 '22 13:11

John Taylor