XHTML HTML element with 100% height causing scrollbars

后端 未结 6 983
渐次进展
渐次进展 2021-01-17 10:29

In my CSS file I use this:

html,body{height:100%;padding:0;margin:0;border:0;}

Which causes a vertical scrollbar to appear on IE8, Chrome 5

6条回答
  •  离开以前
    2021-01-17 10:59

    Why are you setting 100% height in body?

    It will get this height by default.

    It makes sense to set height in body only if you want to set a numeric height in px such as lets say 600px

提交回复
热议问题