3 ms·
"body {min-height:101%;}" will work much better than "overflow-y: scroll". Unlike the latter it's CSS2 (vs CSS3) and also works without bugs.
by powertower 16y ago
"body {min-height:101%;}" will work much better than "overflow-y: scroll".
Unlike the latter it's CSS2 (vs CSS3) and also works without bugs.
- davej 16y agoIn practice this isn't true. As it turns out, the browsers that don't support overflow-y (certain versions of IE) happen to display a vertical scrollbar by default anyway. Adding 'min-height: 100%' to the body will actually add a few pixels of empty space which the user can scroll to (confusing and ugly); whereas "html { overflow-y: scroll; }" will insert a placeholder for the scrollbar, the scrollbar itself will be grayed out. This is much better behavior in my opinion. Also "html { overflow-y: scroll; }" is self-describing (i.e. the real goal is to add a vertical scrollbar to the html, not make the minimum height of the body 101%).