Have you tried using a stylesheet to help out?

Ex. The following does some inline styling and then assigns our user-defined
style "selectskinny" to the <html:select...> tag.


<style type="text/css">
<!--
  .selectskinny {
    width: 50px ;
    color:  green ;
    font-family: arial ;
    font-size: 8pt ;
   }
-->
</style>
                     <html:select property="addressstate" size="1"
styleClass="selectskinny"
                                    disabled="<%=
 billingForm.getFormEditFields() %>">



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, March 24, 2002 2:54 PM
Subject: Controlling MaxWidth for html:options or html:select?


>
> I'm having a hardtime controlling the field-width for a dropdown using
> html:select with html:options:
>
> For example:
>                <td ID="small" width="100" maxlength="100">
>                     <html:select property="addressstate" size="1"
>                                    disabled="<%=
> billingForm.getFormEditFields() %>">
>                                    <html:options collection="states"
> property="value"
>                                          labelProperty="label"/>
>                               </html:select>
>                </td>
>
> My "states" collection contains states like:
> Alaska
> Arkansas
> etc,...
>
> but there's one that is:
> ARMED FORCES CANADA/EUROPE/PACIFIC/AFRICA/MIDDLE EAST/ASIA
>
> Problem I am having is no matter how I try and limit the "width" of the
> dropdown, it wants to be as wide as the largest value in my collection..
> Is there a way to control this so that you get a "horizontal" scrollbar
> when you do the dropdown?     In my example above, it's ignoring my "td
> width="100" and it seems to be taking up about 300 pixels to display the
> largest value  :-(
>
> thanks,
> Theron
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to