View Full Version : Mozilla Scrollbar problem
emanuelle
08-09-2006, 04:55 PM
I want my page in mozilla to have a scroll bar even if the content is very little.
if I add in the body
<body leftmargin="0" topmargin="0" style="OVERFLOW-y: scroll;">
then it shows the scroll in Mozilla as I want it but in IE it will show 2 scrolls.
see image for example
jscheuer1
08-11-2006, 08:12 AM
This will work in the more recent Mozilla based browsers like FF 1.5.0.6:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html {
overflow-y:scroll;
}
</style>
</head>
<body>
</body>
</html>
For older versions use:
<style type="text/css">
html {
height:101%;
}
* html {
height:auto;
}
</style>
BLiZZaRD
08-11-2006, 08:48 AM
Can you use them both together? Still not up on CSS myself.
Using both together seems to capture all versions, yes? Or am I off in that line of thinking?
jscheuer1
08-11-2006, 09:41 AM
The one for the older versions is simply because overflow-y used to be IE only. The older version will produce a page slightly larger than the window, so there will be a scroll bar but it will have a small amount of 'travel' in it. Combining them will not eliminate this in the newer versions. So, to get old and new, just use the old one. The advantage to the new is that there will be no 'travel' in the scroll bar unless the content exceeds the window height, just like in IE.
BLiZZaRD
08-11-2006, 10:09 AM
Ah! Makes sense. Thanks John.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.