Setting The Height Of A Tablerow - Its variable so I want to use

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

Setting The Height Of A Tablerow - Its variable so I want to use

sachavdk
I have a html page with a table. The next "image" shows the layout:

--------------------------------------------------------------
HEAD CELL
--------------------------------------------------------------
CONTENT | Main content cell
LISTING |
CELL... |
---------


Now the "Content listing cell" should always reach the bottom (its a grey cell and the main content is white, so their should be two columns).
If the main content cell's content is long enough so you can scroll down, their is no problem. But when the "Main content cell"'s content doesn't reaches the bottom of the page, the table doesn't reaches the bottom of the page. How can I solve this? I think the only way is JavaScript but how...

PS: I hope my explanation is clear unsure.gif

Reply

Saint_Michael
nope you don't need javascript for best thing to do is make the table all one size then fit those two tables with in it and then it match up with the content with in it. also put somehting their to take up space like banner adds and all that other stuff.

Reply

truefusion
You sure this a JS problem?

Try this:
CODE

<table height="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="##" colspan="2">
HEAD CELL
</td>
</tr>
<tr>
<td valign="top" width="##">
CONTENT LISTING CELL
</td>
<td valign="top">
MAIN CONTENT CELL
</td>
</tr>
</table>

Replace ## with your desired number. This should do what you want. Unless i've misread what you've stated.

Reply

sachavdk
I'm affraid you did sad.gif . The minimal height of the "Content listing Cell" is the height of the window that shows the page (not the entire browserwindow ofcourse) minus the Y position off the "Content listing Cell".

So I actually need the "Content listing Cell"'s Y position (I guess you can call it from a Javascript function using an ID for the cell) and the height of the screen (not the page) and then set the height of the "Content listing Cell" using its ID i guess again to the subtraction of screenheight and "Content listing Cell"'s Y position.

So short said in pseudocode:

Set the height of the "Content listing Cell" to screenheight (maybe document.height or so?) - "Content listing Cell".Ypos (maybe topOffset or so?).

I'm not that familiar with JavaScript you see. I know the syntax but not that kind of functions.

Hope someone can say me how to get those 2 vars and then apply the height to the cell.

 

 

 


Reply

sachavdk
Extra note:

This only serves to make sure the "Content listing Cell" reaches the bottom of the screen on every resolution. Since when I set the resolution to 1280*1024 it is shown correct. But when I set it ie. to 1024*768 the fixed height is to great and so you can scroll an empty page wich is sertainly not the intention.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.


*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for setting, height, tablerow, variable

*MORE FROM TRAP17.COM*
advertisement



Setting The Height Of A Tablerow - Its variable so I want to use



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE