GeeCON Prague 2014*
The moose likes Struts and the fly likes width of List box in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "width of List box in struts" Watch "width of List box in struts" New topic
Author

width of List box in struts

Akshay Jindal
Greenhorn

Joined: Sep 22, 2003
Posts: 3
Hi,
I am using the "select" type in struts to create a list box. How can i asign a width so that it will not colapse if there are no entries in it?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61304
    
  66

Moving to the Struts forum.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Marc Haberkorn
Greenhorn

Joined: Aug 15, 2002
Posts: 10
Have you tried using a stylesheet, and specifying the class to be used via the "class" attribute on the select tag?
Akshay Jindal
Greenhorn

Joined: Sep 22, 2003
Posts: 3
Hi Marc,
Thanks for the immdeiate response.
No i havent tried it.
Was just trying something in the front end itself.
Is there any way of doing it in the JSP?
Or do we need a stylesheet for this requirement?
Regards
Akshay Jindal
Akshay Jindal
Greenhorn

Joined: Sep 22, 2003
Posts: 3
Hi ,
Used
style="width:300;"
in the list box and it works!
Akshay Jindal
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: width of List box in struts