• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Specify selection width for a h:selectOneMenu component in IE

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, thanks for the indications.

Best regards,
Radu
 
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic