Force vertical scrollbar to display in IE8

前端 未结 12 1486
遇见更好的自我
遇见更好的自我 2020-12-16 01:06

The vertical bar does not appear in IE8 if the page is not long enough. In FF, there is a workaround for this

html {
    overflow: -moz-scrollbars-vertical;
         


        
12条回答
  •  旧时难觅i
    2020-12-16 01:45

    Best reply to date (may 2012) for forcing vertical scrollbar in safari, opera & firefox is:

    html {
        height: 101%; /* setting height to 101% forces scroll bar to display */
    }
    html { min-height: 100%; padding-bottom: 1px; }
    

    Opera was the most difficult and would only insert the vertical scrollbar no matter the height of the page if both html tags above were used.

    Thanks - Dianne

提交回复
热议问题