Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine height on runtime

Status
Not open for further replies.

Kostarsus

Programmer
Nov 30, 2000
86
DE
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

 
what exactly do you mean by "the scrollbar truncates the text of the table" ?


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top