Hello,
I have a table that expands the view sometimes. The table isn't high but broad. So I want to add a horizontal scrollbar to the table.
Here is the code, I used:
<div id="div_layer" style="overflow-x:auto;">
<table id="t" border="0" cellspacing="1" cellpadding="3" width="85%" >
...
</table>
</div>
<script>
var wps=document.getElementById("t");
document.all.div_layer.style.pixelHeight=wps.style.height + 30;
if ( (screen.width>=1280) && (top.document.all.framesetId.cols == '216,17,*,26')){ document.all.div_layer.style.pixelWidth=800; }
</script>
If the table grows to broad, the horizontal scrollbar is displayed. This is right, but the scrollbar truncates the text of the table.
So I tried to expand the height of the table by the difference of the height from the scrollbar but the height-value of the table isn't set. Whethter at the end of the page nor in the onLoad event.
Do you have any ideas, how I can expand the table in height, so that the scrollbar don't truncate the contents of the table?
Bye Kostarsus
I have a table that expands the view sometimes. The table isn't high but broad. So I want to add a horizontal scrollbar to the table.
Here is the code, I used:
<div id="div_layer" style="overflow-x:auto;">
<table id="t" border="0" cellspacing="1" cellpadding="3" width="85%" >
...
</table>
</div>
<script>
var wps=document.getElementById("t");
document.all.div_layer.style.pixelHeight=wps.style.height + 30;
if ( (screen.width>=1280) && (top.document.all.framesetId.cols == '216,17,*,26')){ document.all.div_layer.style.pixelWidth=800; }
</script>
If the table grows to broad, the horizontal scrollbar is displayed. This is right, but the scrollbar truncates the text of the table.
So I tried to expand the height of the table by the difference of the height from the scrollbar but the height-value of the table isn't set. Whethter at the end of the page nor in the onLoad event.
Do you have any ideas, how I can expand the table in height, so that the scrollbar don't truncate the contents of the table?
Bye Kostarsus