Hi Aaron:

I tried using a stylesheet but perhaps I am doing it wrong:

My stylesheet class looks like:

.selectStyle
{
    font-size: 7pt;
    font-family: verdana;
    font-weight: bold
   max-width: 110;
}

and the html:select looks like:

<html:select property="addressstate" size="1"
                                   disabled="<%=
billingForm.getFormEditFields() %>" styleClass="selectStyle">
                                   <html:options collection="states"
property="value"
                                         labelProperty="label" styleClass
="selectStyle" />
                              </html:select>

The 2 problems I have is:
1.  The text showing up in the collection is not showing up with the bold
weight.
2.   It ignores my max-width 110 and still decides to show about 300 pixels
for the states collection

:-(

thanks,
Theron



                                                                                       
                   
                    Arron Bates                                                        
                   
                    <arron@keyboardm        To:     Struts Users Mailing List          
                   
                    onkey.com>              <[EMAIL PROTECTED]>           
                   
                                            cc:                                        
                   
                    03/24/02 05:38          Subject:     Re: Controlling MaxWidth for 
html:options or     
                    PM                      html:select?                               
                   
                    Please respond                                                     
                   
                    to Struts Users                                                    
                   
                    Mailing List                                                       
                   
                                                                                       
                   
                                                                                       
                   



Or, use a stylesheet! :)

That's a good one actually. Problem is though, you'll never see what's
cut off by the width in IE. NS6 actually shows the whole thing when it
drops down. Quite cool NS!.

Arron.



John Kroubalkian wrote:

>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]>
>
>



--
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