• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

Select Object Size

It seems to me that the size of a selec object depends of the size of the largest option it contains.
Can I assign a different size of the select ? ?
  • 2
1 Solution
Nope. You /can/ do some funky stuff with the OPTGROUP element, but HTML does not allow for control of the maximum size of the rows. Which is probably a good thing - why cut off your longest entry?

Of course, you could change the size with Java, but that's not really HTML anymore....

(If you are specifically trying to acheive something, let us know - there may be a workaround)

carfloresAuthor Commented:
I donĀ“t want to cut off the longest entry, contrarily I want to make the select bigger than the longest entry
You can make the introductory item extra large:

<OPTION SELECTED>-----Please choose from the following---

Or you can use the non-breaking space entity - it's ugly, but it works:

&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;
<OPTION> Three

Put a space between each one for an added effect.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now