Forum Moderators: not2easy
Recently I found firefox (2.0) is not able to display below html correctly:
<code>
<div style="overflow-x:scroll">
line1<br/>
line2<br/>
...
line2000<br/>
</div>
</code>
There are 2000 lines of text inside the div tag, and firefox only displays up to 1920 (approximately) lines. However, if I remove the overflow style, all 2000 lines can be displayed.
Is this a known issue? Any workarounds?
Thanks for your help.
Robin
Secondly, why use overflow:scroll, when you can just use overflow:auto? Scroll just forces the scrollbar to be there even if there isn't enough content to fill up the container, and it will be grayed out/disabled (so it's not very useful).
Make sure you have a valid doctype set on your page.
Check the page with the W3C validator (HTML and CSS)
Make sure you assigned a height to your container.
Specifying height property of the container div and make it vertically scrollable is a workaround, however it has the drawback that by specifying a fix height, it does not occupy all vertical area of the browser (I've tried to specify height:100% hoping it works the same way like width:100%, but clearly it does not). I plan to write some javascript to adjust height based on viewport size of the browser so that height of the div matches with viewport height automatically).
Anyway, thanks for all your help and I get the idea now.
Regards.
Robin