Solved

Forcing number of lines displayed in pull-down menu?

Posted on 1998-08-28
11
149 Views
Last Modified: 2012-05-04
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
Comment
Question by:Dyrewolf
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1837157
I don't understand exactly what you want to do, but you could try this:
<SELECT ... SIZE="7">

Martin
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1837158
no, SIZE will make a list box with 7 options shown... not a drop-down box.
0
 
LVL 4

Expert Comment

by:martinag
ID: 1837159
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
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1837160
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
 

Author Comment

by:Dyrewolf
ID: 1837161
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 5

Expert Comment

by:Trevor013097
ID: 1837162
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
 

Author Comment

by:Dyrewolf
ID: 1837163
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
 
LVL 5

Accepted Solution

by:
Trevor013097 earned 100 total points
ID: 1837164
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
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1837165
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
 

Author Comment

by:Dyrewolf
ID: 1837166
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
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1837167
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

707 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

18 Experts available now in Live!

Get 1:1 Help Now