Making a select list scroll in IE6

Posted on 2009-04-29
Last Modified: 2012-05-06
Hi -

This seems to be a fundamental but I cannot make IE6 do what I want.
I have a select list that is 9 options long and when the user clicks on the list all 9 options display.   I'd like to have only 4 options display and then have a scroll bar appear to reach the rest.
How is this done in IE6?

<select name="MaterialType" id="MaterialType" style="width:175px;" >


<option>Please Select</option>

<option value="PortlandCementConcrete">Portland Cement Concrete</option>

<option value="PlainConcrete">Plain Concrete</option>

<option value="ReinforcedConcreteRCP">Reinforced Concrete RCP</option>					

<option value="ContinuouslyReinforcedCRCP">Continuously Reinforced CRCP</option>

<option value="PrestressedConcrete">Prestressed Concrete</option>						

<option value="FibrousConcrete">Fibrous Concrete</option>

<option value="AsphaltConcrete">AsphaltConcrete</option>

<option value="RoadMixBituminousSurface">Road Mix BituminousSurface</option>						

<option value="SandAsphalt">Sand Asphalt</option>


Open in new window

Question by:dzash2000
    LVL 4

    Expert Comment

    If you add size = 5, this will display your Please Select and 4 options but will appear like that before the user even uses the select list. Will look like more of a select box than a select list
    I am personally not sure if you can pre-set how many options you see/dont see.
    LVL 5

    Accepted Solution

    I don't believe this is possible, in fact IE7 has rewritten the select element completely because of all the bugs it had.

    There are some 3rd party workarounds that may help. YUI has an autocomplete feature that you can use as a select box and control the number of elements it displays with simple css height. Worth a look I think..


    Author Closing Comment

    blacksix - I'm glad you said that it couldn't be done with IE6 - now I don't feel like I'm losing my mind.  I will check into your other solution.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Title # Comments Views Activity
    AngularJs and HTML5 9 38
    HTML in email body has extra  tick marks 3 42
    html select on change 3 11
    javascript to html map 8 0
    This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    779 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

    14 Experts available now in Live!

    Get 1:1 Help Now