• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • 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 ? ?
0
carflores
Asked:
carflores
  • 2
1 Solution
 
evilgregCommented:
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)

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

<SELECT>
<OPTION SELECTED>-----Please choose from the following---
<OPTION>Monday
<OPTION>Tuesday
<OPTION>Wednesday
etc...

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

<OPTION>Two
<OPTION>
&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.

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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