[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

Forcing number of lines displayed in pull-down menu?

Does anybody know if there is a way to force the browser to display a certain number of options in a select pull-down menu? For instance, if there is a select input with 21 options, and you only want 7 visible at a time, and scrolling to the others, is there an HTML tag that can do that?
0
Dyrewolf
Asked:
Dyrewolf
  • 5
  • 3
  • 2
  • +1
1 Solution
 
martinagCommented:
I don't understand exactly what you want to do, but you could try this:
<SELECT ... SIZE="7">

Martin
0
 
MasseyMCommented:
no, SIZE will make a list box with 7 options shown... not a drop-down box.
0
 
martinagCommented:
Ooh, now I understand what you meant...
That's not possible. :-(
At least not according to the HTML 4.0 spec. (http://www.w3.org/TR/REC-html40/)

Of course it's possible that Netscape/Microsoft has added some special attribute, but I don't think they have.

Martin
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Trevor013097Commented:
All,

I think that you can do it using CSS in IE.  You can control most of the form elements using CSS from colour and font to width so there might be a way to control list box size, I'll check.

Trevor.


0
 
DyrewolfAuthor Commented:
Trevor -

That would be great if you could find out. This is a project for work I told them I would look into, and they probably wouldn't be cool that at least everybody with Netscape/IE 3.0+ could handle, and back to 2.0 if possible.

Thanks for the help
Adam
0
 
Trevor013097Commented:
Dyrewolf,

I have searched the entire Microsoft reference and CSS guide and there does not appear to be anyway to do this.  There was a property called overflow which was to define the height of an object and then have scrollbars applied if the object exceeded that height.  However it applied to textareas and not to SELECT objects.

I have in an attempt to find a solution e-mailed the problem to Microsoft's Web Men (as they like to be called) and hope for an anwser one way or another soon.

Unfortunately I suspect that any solution is only going to work in IE4. There is definately not going to be a solution for version 2 browser and it is highly unlikely that there will be a solution for version3 browsers or even Netscape 4.

In general IE4 has much more ocntrol over document objects due to its much larger CSS capapility.

I'll let you know as soon as I get a response.

Trevor.


0
 
DyrewolfAuthor Commented:
Trevor -

Much obliged for all the help. I kinda suspected we wouldn't be able to do it, but I told them I would check into it. You can submit your next comment as a answer so that I can hook you up with some points for your efforts.

Thanks
Adam
0
 
Trevor013097Commented:
Dyrewolf,

CSS is definately the solution although will only work in IE4 as it has a much larger CSS capability.

I await a response from Microsoft's Web Men on the matter as I have found nothin gon the Microsoft Sitebuilder Network.

The page on this site containing all the DHTML and CSS stuff can be found at:

http://www.microsoft.com/workshop/c-frame.htm?904518899020#/workshop/author/default.asp

You may need to register as a memeber first to get access unless you are already (its FREE).

I'll post here again when I get news from MS.

Trevor.


0
 
Trevor013097Commented:
Dyrewolf,

Thanks for the points, sorry I can't give a more definative answer at this time, but I'll keep you posted.

Trevor.

0
 
DyrewolfAuthor Commented:
Wouldn't it be really sweet of somebody actually made Netscape and MS share standards? This would be so much easier. : )

Again, thanks a ton for the help, and let me know if you find out any other details.

Adam
0
 
Trevor013097Commented:
Dyrewolf,

I think that is every web programmers dream!!  A virtual world where Netscape and Microsoft develop languages and features to a common standard.  Maybe one day.

Thanks for the 'A'.

Trevor.


0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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