Results 1 to 6 of 6
Related
-
Problem in tags Forum: PHP Forum
Replies: 8 -
want to make a specific scrollable table Forum: CSS Forum
Replies: 0 -
scrollable, stationary table Forum: HTML Forum
Replies: 2 -
Table tags Forum: HTML Forum
Replies: 1
-
03-01-2009, 01:05 PM #1
problem in scrollable table by <div> tags
Hi
After reading from the thread http://www.ahfb2000.com/webmaster_help_desk/showthread.php?t=849,I was able to make my table scrollable ,but there 2 problems lingering still:
1.i have to fix the pixel size in div tag like :
<div align = "left" style="width:1000px; height:400px; overflow:scroll; border:0px;">
<table align ="left"><tr> <td id = "divHolder"> </td > </tr>
</table>
But i am putting data dynamically into table so sometimes scrolls formed are larger than what i needs
2.On different terminal with different resolution, the table may take less/more space and thus waste/consume the space
So all in all ,i want to free myself of pixel dependency and move to table contents dependency
really expecting help from this wonderful forum ,blessed in having great expets!!
-
03-02-2009, 10:05 AM #2
Re: problem in scrollable table by <div> tags
Try using max-height instead. So change the code you posted to:
Code:<div align = "left" style="width:1000px; max-height:400px; height: expression(this.height > 400 ? 400 : true); overflow:auto; border:0px;"> <table align ="left"><tr> <td id = "divHolder"> </td > </tr> </table> </div>
-
03-02-2009, 12:17 PM #3
Re: problem in scrollable table by <div> tags
Hey Boss
Its working!!!The size of scroll is changing as per the table size as what i wanted(in Mozilla).But it doesn't seem to work in IE,where vertical scroll being formed is very long and doesn't fit in one screen.Yours help needed again!!
Thnx
-
03-02-2009, 12:40 PM #4
Re: problem in scrollable table by <div> tags
Please either post your code or post a link to the page you are working on.
-
03-13-2009, 10:11 PM #5
Re: problem in scrollable table by <div> tags
jthayne:
Your solution was correct EXCEPT I couldn't get the javascript expression to evaluate correctlyin IE(so the box just got bigger and bigger with no scrollbar). Finally, after much chagrin, searching and staring at it blankly, I tried changing height in your expression to clientHeight and it not only works on IE but both IE and Firefox, although it probably broke some other browser's implementation of Javascript, but that's really not my forte... lol
so, ...final code:
Code:<div align = "left" style="width:1000px; max-height:400px; height: expression(this.clientHeight > 400 ? 400 : true); overflow:auto; border:0px;"> <table align ="left"><tr> <td id = "divHolder"> </td > </tr> </table> </div>
Last edited by markei; 03-13-2009 at 10:16 PM.
-
03-16-2009, 09:34 AM #6
Re: problem in scrollable table by <div> tags
Glad to hear it is working, and a big thank you for posting the solution.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum