1

I would like to know how to remove the scroll bar from the select dropdown list? I have also tried overflow: hidden; but it doesn't work in Firefox.

CSS:

.search_pulldown_txtbox1
{
    height:120px;
    overflow:hidden;
    width: 160px;
    margin-top:8px;
    background-image:none;
    margin-left:10px;
    line-height: 14px;
}

HTML:

<select name="keyword_select" multiple="multiple" class="search_pulldown_txtbox">
    <option> 1</option>
    <option> 2</option>
    <option> 3</option>
</select>
1
  • 1
    I would assume that you can't. At best it would be very platform specific. Some aspects of form elements you don't (and shouldn't) have styling control over. Commented Jun 10, 2011 at 2:52

2 Answers 2

2

<select>s are notoriously difficult to style. Each browser renders them differently. If you really must control the look and feel of a <select>, then you may have to resort to custom components built from other HTML elements. E.g. this one.

Sign up to request clarification or add additional context in comments.

1 Comment

I'm with Box9, mimicking Select functionality and integrating the custom component into your form handling would give you much more consistent flexibility.
0

Hide vertical scrollbar in <select> element

1 Comment

but i am not sure of how many data it will receive.because coming from database.Also i had tried size="3" for testing even doesn;t work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.