• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Specify selection width for a h:selectOneMenu component in IE

 
Radu Mircea
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !

I am not able to see menu item's value if it is greater than combo box width.

In FireFox the selection for items is expanding automatically so that items values could be seen in any case but in IE it is fixed... and in above case the items are cut.

Please if you have an idea how to solve this issue give me an hand !

Best regards,
Radu
 
Samuel March
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the h:selectOneMenu there is a style= attribute and class= attribute that behaves and is for use exactly the same as in HTML when written in.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samuel March wrote:On the h:selectOneMenu there is a style= attribute and styleClass= attribute that behaves and is for use exactly the same as in HTML when written in.


Small difference between HTML and JSF.
 
Radu Mircea
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
Thanks a lot for yours messages.

Yes using styleClass and style there could be a solution but doing that right now will crush all the application layout, since combo boxes already have a specified dimension and position on GUI page.

The big issue as far as i know comes from the fact that in HTML the "width" attribute is not recognized for an "option" tag included in a "select" tag in IE. It seems that this width for "option" tag will never be larger than width of the "select" tag.

Right now i am trying to find a work around using JQuery.... to simulate FireFox behavior for comboboxes in IE , anyway i don't see any solution than to large the width of the select tag and than to re-sized it to original width.

By the way, could i ask here some questions related to jQuery ?

Best regards,
Radu

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's considered preferable NOT to specify your style attributes on the page, actually. If you define them in a central stylesheet, you not only help ensure that all pages in the app are more visually consistent, you also improve the ability to "skin" the app.

We have a forum for web page scripting. Probably jQuery questions will get better answers there.
 
Radu Mircea
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks for the indications.

Best regards,
Radu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic