• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

decreasing width of drop down box

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks, i am populating a drop down from database in a jsp page.

The values retrieved are longer so the drop down width size increases to the highest length of the value and it makes the form look dirty.

is there any way to solve this problem. how can i shrink the drop down box, if possible can the box being displayed on clicking drop down be bigger than the actual dropdown width.

my code is

<html:select property="name" onchange="getname(this)">

<html ptions collection="nameDetails" property="nameID" labelProperty="Name" />
</html:select>


Thanks,
Ketan.B.Parekh
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might be able to use attribute styleClass of struts html:select tag. This styleClass is similar to class attribute in html select tag and can be customized in CSS file.

For example in CSS you can use code like this:



You can then use styleClass="FormBox50" in html:select tag.

Hope this works out for you.
 
Ketan Parekh
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sid, it really worked.
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic