Log in

View Full Version : scroll problem with firefox



emanuelle
10-22-2007, 10:03 AM
I have a table in a div that needs to scroll vertically
<div style="OVERFLOW-Y: scroll; OVERFLOW-X: hidden; WIDTH:720; HEIGHT:340; scrollbar-face-color:#C4C9CC;"> <Table></Table>
</div>

Now Firefox doesnt react to the height mentionned in my div (HEIGHT:340)

what should I change?

jscheuer1
10-22-2007, 10:41 AM
The basic problem is that you need to specify units:


<div
style="overflow-y:scroll;overflow-x:hidden;width:720px;height:340px;scrollbar-face-color:#c4c9cc;">
<table></table>
</div>

However, a better way to get a vertical scroll bar is to use overflow:auto; and just make sure that the width of the content (in this case your table) isn't any wider than the container division:


<div
style="overflow:auto;width:720px;height:340px;scrollbar-face-color:#c4c9cc;">
<table></table>
</div>

That makes it compatible with browsers that don't support the x and y overflows, and allows for a horizontal bar, should one become necessary due to unforeseen circumstances. Without that possibility (if the content gets too wide for the container), some of your content would end up invisible.

hakopa
10-22-2007, 12:36 PM
yeah i think you might need to check this:

<div id="rightspace">
<font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif" size="1">Advertisement</font>
<script type="text/javascript"><!--
google_ad_client = "pub-8765663695007104";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "image";
//2007-10-21: ebaylair
google_ad_channel = "4056817074";
google_color_border = "68B5F0";
google_color_bg = "2389D8";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//-->

It is not aligned right enough as well. but may be you are testing on a different screen to me.