Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Setting The Height Of A Tablerow, Its variable so I want to use
sachavdk
post Jul 18 2005, 10:38 PM
Post #1


Member [Level 1]
****

Group: Members
Posts: 62
Joined: 11-July 05
Member No.: 9,266



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
Go to the top of the page
 
+Quote Post
Saint_Michael
post Jul 18 2005, 10:47 PM
Post #2


$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3
*********************

Group: [HOSTED]
Posts: 6,443
Joined: 21-September 04
From: 9r33|\| 399$ 4|\|D 5P4/\/\
Member No.: 1,218
T17 GFX Crew



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.
Go to the top of the page
 
+Quote Post
truefusion
post Jul 18 2005, 10:51 PM
Post #3


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,893
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528
T17 GFX Crew



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.
Go to the top of the page
 
+Quote Post
sachavdk
post Jul 18 2005, 11:07 PM
Post #4


Member [Level 1]
****

Group: Members
Posts: 62
Joined: 11-July 05
Member No.: 9,266



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.
Go to the top of the page
 
+Quote Post
sachavdk
post Jul 18 2005, 11:16 PM
Post #5


Member [Level 1]
****

Group: Members
Posts: 62
Joined: 11-July 05
Member No.: 9,266



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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics


 



- Lo-Fi Version Time is now: 5th September 2008 - 09:22 AM