Solved

Select Object Size

Posted on 1998-08-20
3
172 Views
Last Modified: 2010-04-09
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
Comment
Question by:carflores
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
evilgreg earned 50 total points
ID: 1836860
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
 

Author Comment

by:carflores
ID: 1836861
I don´t want to cut off the longest entry, contrarily I want to make the select bigger than the longest entry
0
 
LVL 1

Expert Comment

by:evilgreg
ID: 1836862
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

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pass form variable from one web form to another 2 29
Filktering Alphabetically 8 31
Wordpress Hacked 1 29
CSS DIV Height in Percent 1 5
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question