Jump to content
xisto Community
Sign in to follow this  
sachavdk

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

Recommended Posts

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 :D

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

You sure this a JS problem?

Try this:

<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.

Share this post


Link to post
Share on other sites

I'm affraid you did :D . 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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.