|
Posted by Leonard Blaisdell on August 25, 2005, 9:11 pm
Please log in for more thread options
justdummy_at_coolgoose_dot_com@foo.com (justdummy) wrote:
> Hi,
>
> I am struggling with a problem for sometimes. I need to display a table in
> a html and if the height of the table goes beyond 200 px then a vertical
> scrollbar should alone appear without any horizontal scroll bar. If the
> height of the table is less than 200 px then no scroll bars should appear.
> Here is the html below. I tried to wrap the table around a <div> tag but
> its doesn't work out as the scroll bar appear close to the scroll bar of
> the page rather than close to the table. Further if the height of the
> table is less than 200 px (i.e., with fewer number of rows like just 2
> rows) then also the scroll bars appear.
>
> Am I missing anything in this? Or Is there any other better solution to
> this? I would appreciate any help to solve this problem.
> <div style="height:200px; overflow:scroll">
> <table cellpadding="0" cellspacing="1" width="800px">
<...>
> </table>
> </div>
Well, this particular table is 800px wide. You will automatically get a
horizontal scroll at less than that. You may have other problems.
leo
--
<http://web0.greatbasin.net/~leo/
|