Solved

Select Object Size

Posted on 1998-08-20
3
169 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
CSS/audio questions 2 48
fix wrap around navigation on tablet device 3 31
Condidional <a href = ....> 1 23
Animate a Title 7 33
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now