PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, November 7, 2022

[FIXED] How to make p:menu scrollable in primefaces?

 November 07, 2022     menu, primefaces, scroll, scrollable     No comments   

Issue

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)?

Thank you


Solution

Use the following CSS:

.ui-menu {
  overflow-y: scroll;      
  height: 200px;      
}


Answered By - Hatem Alimam
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing