Solved

Forcing number of lines displayed in pull-down menu?

Posted on 1998-08-28
11
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

728 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