Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the scrollbar not work in IE?

I have created a scrollbar and it works perfectly fine in google chrome and firefox but not in IE. I have a feeling it has to do with the line-height property.

My Code:

Html:

<div id="scrollbar"><br /></div>

Css:

#scrollbar {
    margin-top: 10px;
    height: 220px;
    float: right;
    overflow-y: scroll;
    line-height: 403px;
}

Here is my jsfiddle.

Anyway to get this to work in IE?

like image 832
Anthony Avatar asked Oct 19 '22 07:10

Anthony


1 Answers

Change the <br/> to a &nbsp;. IE picks up the non-breaking space a bit better than just a <br> tag. http://jsfiddle.net/s9sycey1/3/

like image 83
scrappedcola Avatar answered Oct 22 '22 00:10

scrappedcola