Change the font size selectOneMenu

Post Reply
ingridcouto
Posts: 4
Joined: 19 Oct 2016, 15:24

19 Oct 2016, 15:37

Hello,
I need to change the source of such specific selectOneMenu component.
I've changed in the css class, more just changing all selectOneMenu, you need to change only one selectOneMenu.
can you help me? How should I do?

Thanks

User avatar
aragorn
Posts: 2926
Joined: 29 Jun 2013, 12:38

21 Oct 2016, 08:32

Please try;

Code: Select all

<style>
    .MyOneMenu.ui-selectonemenu .ui-selectonemenu-label {
          font-size: 10px;
    }
            
    .MyOneMenu.ui-selectonemenu .ui-selectonemenu-trigger {
          height: 33px !important; /* you can change this value according to the value of your font-size. */
     }
</style>

<p:selectOneMenu styleClass="MyOneMenu" .../>

ingridcouto
Posts: 4
Joined: 19 Oct 2016, 15:24

21 Oct 2016, 13:03

I tried as you passed me, nothing has changed.

User avatar
aragorn
Posts: 2926
Joined: 29 Jun 2013, 12:38

21 Oct 2016, 14:45

Can you please attach your code and a screenshot for us?

ingridcouto
Posts: 4
Joined: 19 Oct 2016, 15:24

21 Oct 2016, 15:22

<style>
.MyOneMenu.ui-selectonemenu .ui-selectonemenu-label {
font-size: 10px;
}

.MyOneMenu.ui-selectonemenu .ui-selectonemenu-trigger {
height: 33px !important;
}
</style>

<p:selectOneMenu id="ambiente" value="#{FMb.ambiente}" styleClass="MyOneMenu" >
<f:selectItem itemLabel="Produção" itemValue="Prod" />
<f:selectItem itemLabel="Homologação" itemValue="Hom" />
</p:selectOneMenu>

ingridcouto
Posts: 4
Joined: 19 Oct 2016, 15:24

07 Nov 2016, 15:43

Good day,
Thanks for the code, most did not work because this selectOneMenu is within a TabView. I auditioned to take the selectOneMenu out of TabView and works perfectly.
Does it have any way to change himself being within the tab?
aragorn wrote:Please try;

Code: Select all

<style>
    .MyOneMenu.ui-selectonemenu .ui-selectonemenu-label {
          font-size: 10px;
    }
            
    .MyOneMenu.ui-selectonemenu .ui-selectonemenu-trigger {
          height: 33px !important; /* you can change this value according to the value of your font-size. */
     }
</style>

<p:selectOneMenu styleClass="MyOneMenu" .../>

User avatar
aragorn
Posts: 2926
Joined: 29 Jun 2013, 12:38

25 Nov 2016, 16:48

Can you please attach a screenshot for us?

Please try;

Code: Select all

.MyOneMenu.ui-selectonemenu .ui-selectonemenu-label {
   font-size: 10px !important;
}

.MyOneMenu.ui-selectonemenu .ui-selectonemenu-trigger {
   height: 33px !important;
}

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests