View Full Version : DIV won't size to 100%
AaronW
08-06-2003, 03:39 PM
http://www.aaron-wright.com/simplyaudiobooks/ReportsPage.php?dateStart=June+1st%2C+2003&dateEnd=August+6th%2C+2003
Basically I'm trying to get that page to look the same in IE as it does in Mozilla.
The DIV is set to overflow: scroll, but stupid IE just increases the width of the DIV rather than scroll any overflow under it.
Any help would be greatly appreciated. Thanks.
MotherNatrsSon
08-06-2003, 04:26 PM
It is set to overflow, but it is also set to width 100%. Attached is a pic in IE 5.1 on Mac. I am guessing, but I think you are dealing with the "box model" bug in IE. See this (http://www.tantek.com/CSS/Examples/boxmodelhack.html)
I'll attach a pic in Netscape 7 so people can see what it is supposed to look like as well.
MNS
MotherNatrsSon
08-06-2003, 04:27 PM
The Netscape pic
MNS
AaronW
08-06-2003, 10:25 PM
I don't think it's related to the box model bug.
Maybe. But it's just that it's not scrolling when it needs to. Instead of scrolling when it needs horizantal space, it just resizes, which isn't what I told it to do.
Cymru
08-06-2003, 11:37 PM
Why not try this? This seems to degrade nicely among the browsers.
Add an id to the scrolling div tag, such as scroll. Then add these lines to the end of your script.
if(navigator.appVersion.split("MSIE")){
document.getElementById("scroll").style.width=(document.body.clientWidth-220)+"px";
}
Tell me if this works.
AaronW
08-06-2003, 11:52 PM
Heh, was thinking of something like that. Was hoping there'd be a CSS/HTML way to do it though.
Will try something like that for now though.
Actually, it seems to work fine for all this thing's going to be used for. Since it's only going to be used in IE6 on WinXP, an alternative isn't needed.
Would still be nice to know how to get around something like this though.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.