Jump to content

select box fixed widths


chadmichael

Recommended Posts

<select style="width:###px"><option value="0">000</select>

Thanks! That works great. Actually, I was just overlooking that because of the struts HTML-EL tag has a styleClass attribute instead of class. BUT . . . the bigger problem is preserving the space in the option text. I have headers above the select box at fixed widths. Now I need to make the items of data within the option text stay a fixed width apart??? I tried to use pre tags inside the option but they don't seem to work there.
Link to comment
Share on other sites

I'm not understanding your question

The options in the select box have several "pieces" of data. Such as first name, last name, gender, etc. Above the select box are headings, such as First Name, Last Name, Gender. These items are controlled through layout and style sheets. But I need the pieces in the options to line up under the appropriate headings. The option tags look something like this<option value="1">Chad Michael Male</option><option value="2">Elvis Costello Male</option><option value="3">Jennifer Aniston-Pitt Female</option><option value="4">Mark Mothersbaugh Male</option>Of course, while my headings, in table cells, are controllable, the text of these optoin bodies collapses. Again,  's could do the trick but that seems to be bad style. Maybe I'm just using the select box in ways it isn't meant to be used. Is there a better solution?Chad
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...