1

I have a selectOneMenu on my JSF page. I want to rearrange various fields on the page and for that I used style="width:150px;" attribute to restrict the width of the selectOneMenu lists.

This does restrict the Size of list and UI is looking good, But when I click on the list to select an item the display items are also restricted to the width I set and thus are truncated.

Is there any way using which, I restrict the size of collapsed list but when I expand a selectOneMenu, I see complete menu items which are not truncated?

enter image description here

Mukul Goel
  • 8,387
  • 6
  • 37
  • 77
  • 1
    So.. You're using IE6/7/8? This question then duplicates http://stackoverflow.com/questions/73960/dropdownlist-width-in-ie/ Note: not a JSF problem. Just plain HTML/CSS/JS problem. JSF is in the context of this question merely a HTML/CSS/JS code generator. – BalusC Jul 09 '13 at 10:46
  • @BalusC : Yes the application is IE8 certified. I cant move it to other browser. Any suggestion(s) how it can be done assuming Environment is fixed? – Mukul Goel Jul 09 '13 at 11:39
  • Just click the duplicate question link? – BalusC Jul 09 '13 at 11:43
  • @BalusC: Yup..Sorry.. Got the answer. Thanks (y) – Mukul Goel Jul 09 '13 at 11:50

1 Answers1

0

Use in the header of your xhtml and configure as you like the following css:

.ui-selectonemenu{width: 9.2% !important;}
.ui-selectonemenu-label{width: 100% !important;}
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
Rodrigo
  • 31
  • 2