table height?

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

User avatar
Virtuoso
php-forum Active User
php-forum Active User
Posts: 268
Joined: Mon Jul 21, 2003 7:05 am
Contact:

table height?

Postby Virtuoso » Wed Jul 23, 2003 9:47 am

does the table height thing actually work? I tried it, but it sill divided the td equally

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Wed Jul 23, 2003 12:07 pm

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.

kyle
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Jul 29, 2003 2:54 pm
Location: NY, USA
Contact:

Postby kyle » Wed Jul 30, 2003 6:36 pm

1) Table height is ok with IE. But not all browsers support it, such as Netscape. Table height will have not affect with supported browsers.

2) If you want to divide TD equally, you can make the width of percentage equally.
For example:
<tr><td width=25%></td><td width=25%></td><td width=25%></td><td width=25%></td></tr>

As long as total width is not excess 100%.

Source
New php-forum User
New php-forum User
Posts: 5
Joined: Thu Aug 21, 2003 4:51 pm

Postby Source » Thu Aug 21, 2003 5:59 pm

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.

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Fri Aug 22, 2003 1:11 am

You can use invisible images to ensure that the cells will have the width and height you want.

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Fri Aug 22, 2003 5:58 am

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.

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

table problem!!!

Postby ruturajv » Fri Aug 22, 2003 11:04 pm

If you give height of table as 20 and then insert an image of height 100px sorry boss the table will explode accordingly

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Sat Aug 23, 2003 2:26 am

Of course!
I did not undersand what this was about.
I'm sorry.

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Re: table problem!!!

Postby swirlee » Sat Aug 23, 2003 12:54 pm

ruturajv wrote: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.

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Lost it!!!!

Postby ruturajv » Sun Aug 24, 2003 9:26 pm

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]


Return to “HTML Basics”

Who is online

Users browsing this forum: No registered users and 1 guest