Code: Select all
<p:badge value="2">
<p:menuitem id="om_" value="Requests" icon="fas fa-fw fa-user-lock" outcome="/aut/requests"/>
</p:badge>
Primefaces 11
Code: Select all
<p:badge value="2">
<p:menuitem id="om_" value="Requests" icon="fas fa-fw fa-user-lock" outcome="/aut/requests"/>
</p:badge>
Code: Select all
<span class="menuitem-badge">1</span>
Code: Select all
.menuitem-badge {
position: absolute;
right: 2.5em;
display: inline-block;
width: 18px;
height: 18px;
text-align: center;
background-color: #E91E63;
color: #ffffff;
font-size: 14px;
font-weight: 700;
line-height: 18px;
border-radius: 50%;
}
Code: Select all
<p:menuitem badge="1" ..../>
Code: Select all
<style>
.menuitem-badge {
position: absolute;
right: 2.5em;
display: inline-block;
width: 18px;
height: 18px;
text-align: center;
background-color: #E91E63;
color: #ffffff;
font-size: 14px;
font-weight: 700;
line-height: 18px;
border-radius: 50%;
}
</style>
Users browsing this forum: No registered users and 1 guest