table height?

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
does the table height thing actually work? I tried it, but it sill divided the td equally
 
Which "table height thing", exactly? Also, I'm not sure what you mean by "divided equally". But table cell height is notoriously difficult to control. CSS2 has the min-height and max-height attributes, but they aren't implemented in most browsers yet. If you want to force a table cell to be at least a certain height, currently the best way to do this is to use a spacer image to force the row to that height. If you want a table cell to be at most a certain height, you're basically out of luck. Pretty much all you can do is make sure the cell is wide enough to contain the content so the content doesn't force it to expand vertically.
 
Table height will work in IE, but only if you are not creating a nested table.

As for the <td>'s, do what kyle told you. But <td>'s in this context don't have much with height, so better define <tr height="row_height">. You can do it in percentages as well as in pixels.
 
You can use invisible images to ensure that the cells will have the width and height you want.
 
There's still no way to specify a max-height or max-width in IE, though, only minimum, which seems to be the issue here.
 
If you give height of table as 20 and then insert an image of height 100px sorry boss the table will explode accordingly
 
Of course!
I did not undersand what this was about.
I'm sorry.
 
ruturajv said:
If you give height of table as 20 and then insert an image of height 100px sorry boss the table will explode accordingly

A) Why are you putting an image in a table cell that's larger than the desired size of the cell?

Addendum to A) Why are you letting your users do this?

Seems lazy to me. Not only do we have PHP to mitigate issues like this, we also have the CSS overflow and clip properties to deal with this. There's no reason not to.
 
Why are you putting an image in a table cell that's larger than the desired size of the cell?

Sorry I was just trying to tell the original owner of this post

And i've lost the original aim of this post :( :( [/code]
 
Back
Top