Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make p:menu scrollable in PrimeFaces?

Tags:

jsf

primefaces

I have a menu which I fill programmatically with a model. But I want it to become scrollable when its items become too many to be displayed in the page.

Here is my menu:

<p:menu overlay="true" trigger="imgNotif" my="left top"
        at="bottom left" model="#{notifController.model}" />

Is there a way to make it scrollable (programmatically or using its style/attributes)?

like image 214
Sinda MOKADDEM Avatar asked Oct 23 '25 18:10

Sinda MOKADDEM


1 Answers

Use the following CSS:

.ui-menu {
  overflow-y: scroll;      
  height: 200px;      
}
like image 190
Hatem Alimam Avatar answered Oct 26 '25 23:10

Hatem Alimam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!