![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a table like the following, with a cell that I need to be a fixed width/height to accommodate its background image. I want the other cell to take up all of the *remaining* width. However width:100% seems to use all the width before allocating space for the fixed width cell. Is there a way to specify a percentage of the remaining width after all the fixed width cells have been drawn? (I know in this simple example it's easier just to say width:84px for the second cell, but in real life I won't always know the exact width of the container) Thanks for any ideas. table style="width:100px" tr style="height:20px;" td style="width:16px;background-color:red"></td td style="width:100%;background-color:green"></td /tr /table |
#3
| |||
| |||
|
|
On 2009-01-14, Mark Smith wrote: I have a table like the following, with a cell that I need to be a fixed width/height to accommodate its background image. I want the other cell to take up all of the *remaining* width. However width:100% seems to use all the width before allocating space for the fixed width cell. Is there a way to specify a percentage of the remaining width after all the fixed width cells have been drawn? (I know in this simple example it's easier just to say width:84px for the second cell, but in real life I won't always know the exact width of the container) Thanks for any ideas. table style="width:100px" tr style="height:20px;" td style="width:16px;background-color:red"></td td style="width:100%;background-color:green"></td /tr /table table style="width:100%" * <tr style="height:20px;" * * <td style="width:16px;background-color:red"></td * * <td style="background-color:green"></td * </tr /table * *Note, however, that 20px may not be high enough to contain any * *text. -- * *Chris F.A. Johnson * * * * * * * * * * *<http://cfaj.freeshell.org * *================================================= ================== * *Author: * *Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) |
![]() |
| Thread Tools | |
| Display Modes | |
| |