p:menuitem drop down style proble

UI Components for JSF
Post Reply
raj0419
Posts: 6
Joined: 25 Nov 2013, 06:41

18 Sep 2014, 18:57

HI

My problem is in P: menu button > p:menuitem drop down it is coming more than the p menubutton size as you can see in primefaces showcase. I need to change the width of drop down of P:menuitem

diogoroos
Posts: 7
Joined: 13 May 2010, 16:14

18 Sep 2014, 20:24

Try it:

Code: Select all

<h:head>
   <style type="text/css">
      .ui-menuitem {
         width: 300px !important;
      }
      .ui-menu {
         width: 600px !important;
      }
   </style>
</h:head>
<h:body>
    <p:menuButton value="Options">
           <p:menuitem value="Save" icon="ui-icon-disk"/>
    </p:menuButton>
</h:body>
If in doubt, look at the styles/class when loading the page.
Inspect element in Chrome / Firefox.

This if the component does not have specific attribute.

tags: width menuitem, size menuitem, style menuitem, class menuitem, menu, dropdown

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 29 guests