Hide vertical scrollbar in element

I know this thread is somewhat old, but there are a lot of really hacky answers on here, so I’d like to provide something that is a lot simpler and a lot cleaner:

select {
    overflow-y: auto;
}

As you can see in this fiddle, this solution provides you with flexibility if you don’t know the exact number of select options you are going to have. It hides the scrollbar in the case that you don’t need it without hiding possible extra option elements in the other case. Don’t do all this hacky overlapping div stuff. It just makes for unreadable markup.

Leave a Comment