![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This is probably a basic question but seems to be hard for me to find. How do you tell a cell to take up all the vertical space it can? (By default the 1st cell does it but I want the 3rd to). style="height: 100%;" doesn't work and can't find a "vertical-align:justify;" option. Below is what my table looks like. 1 2 3 4 5 6 1/3/5 are all merged with rowspan=2. Cell 2 has to fit its data. Cell 4 has to be right under Cell 2 always. I want Cell 6 to take up any extra room with blank space so that Cell 1 or 4 arn't stretched (Cell 4 has special background). Note: 1 2 3 4 This situation would also be fine (1/3 merged). It works the way I want it to when Cell 2 is higher than the data in 1/3. But when data in Cell 2 is small then Cell 2 gets stretched which I'd like to advoid. |
#3
| |||
| |||
|
|
Excuse me while I pray: Dearest God Almighty, greatest of all HTML authors, Please make a subscriber who has a complicated question supply a f*ing url. thank you. |
#4
| |||
| |||
|
|
In article c06ed205-11ee-44e8-a012-4ff956ac2... (AT) h11g2000prf (DOT) googlegroups.co m>, *NvrBst <nvr... (AT) gmail (DOT) com> wrote: This is probably a basic question but seems to be hard for me to find. How do you tell a cell to take up all the vertical space it can? (By default the 1st cell does it but I want the 3rd to). *style="height: 100%;" doesn't work and can't find a "vertical-align:justify;" option. *Below is what my table looks like. 1 2 3 4 5 6 1/3/5 are all merged with rowspan=2. *Cell 2 has to fit its data. Cell 4 has to be right under Cell 2 always. *I want Cell 6 to take up any extra room with blank space so that Cell 1 or 4 arn't stretched (Cell 4 has special background). Note: 1 2 3 4 This situation would also be fine (1/3 merged). *It works the way I want it to when Cell 2 is higher than the data in 1/3. *But when data in Cell 2 is small then Cell 2 gets stretched which I'd like to advoid. Excuse me while I pray: Dearest God Almighty, greatest of all HTML authors, Please make a subscriber who has a complicated question supply a f*ing url. thank you. PS. And wipe all those tut tuts from the faces of your most faithful servants. -- dorayme- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
Excuse me while I pray: Dearest God Almighty, greatest of all HTML authors, Please make a subscriber who has a complicated question supply a f*ing url. thank you. |
#6
| |||
| |||
|
|
On Jan 10, 7:13 pm, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: Excuse me while I pray: Dearest God Almighty, greatest of all HTML authors, Please make a subscriber who has a complicated question supply a f*ing url. thank you. Whats a flying url? |
#7
| |||
| |||
|
|
Hehe sorry don't have a URL yet... |
|
want by seperating column 1 and column 2 into 2 seperate tables and then putting both tables into a new table. If someone has a more elegant solution please tell. Below is how my solution looks like in code form if it helps table style:"vertial-align: top;"><tr td> <table><tr><td>*Menu*</td></tr></table> </td td> <table><tr><td>*Data1*</td></tr><tr><td>*Data2*</td></tr></ table> </td /tr></table Using 3 tables isn't that elegant though... This is what I'd like it to look like, what it was before (In code form) table tr td rowspan="3">*Menu*</td td>*Data1*</td /tr tr><td>*Data2*</td></tr tr><td style="vertial-align:justify;"></td></tr /table What doesn't work in the this way is the "vertical-align:justify;" line. I've tried setting the cells above it to "height: auto;" (which is suppose to give it the min size they can be) and then leaving the last cell with no height set but that didn't work either. |
|
percentage> | <length> | inherit |
#8
| |||
| |||
|
|
NvrBst wrote: Hehe sorry don't have a URL yet... * Well you can upload an example. Use your ISP's personal webspace or some free server... I was able to acomplish what I want by seperating column 1 and column 2 into 2 seperate tables and then putting both tables into a new table. *If someone has a more elegant solution please tell. *Below is how my solution looks like in code form if it helps table style:"vertial-align: top;"><tr td> *<table><tr><td>*Menu*</td></tr></table> *</td td> *<table><tr><td>*Data1*</td></tr><tr><td>*Data2*</td></tr></ table> *</td /tr></table Using 3 tables isn't that elegant though... *This is what I'd like it to look like, what it was before (In code form) table tr td rowspan="3">*Menu*</td td>*Data1*</td /tr tr><td>*Data2*</td></tr tr><td style="vertial-align:justify;"></td></tr /table What doesn't work in the this way is the "vertical-align:justify;" line. *I've tried setting the cells above it to "height: auto;" (which is suppose to give it the min size they can be) and then leaving the last cell with no height set but that didn't work either. 1) There is no value "justify" for property "vertical-align". Valid values: baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit Anyway if you wish to duplicate your three table layout with one, then you need colspan 2 not 3 table tr><td rowspan="2">*Menu*</td><td>*Data1*</td></tr tr><td>*Data2*</td></tr /table -- Take care, Jonathan ------------------- LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com- Hide quoted text - - Show quoted text - |
#9
| |||
| |||
|
|
I need the "vertial-align:justify;" cell so that vertical stretching doesn't occur in the *Data1* and *Data2* cells. I know there is no justify for vertical alignment but I stated it because that is the kind of effect I need. If I use your example (using rowspan=2) then I'd have the problem (as labled in the inital post) of *Data2* cell being stretched when *Data1* +*Data2* height is less than *Menu* |
#10
| |||
| |||
|
|
NvrBst wrote: I need the "vertial-align:justify;" cell so that vertical stretching doesn't occur in the *Data1* and *Data2* cells. *I know there is no justify for vertical alignment but I stated it because that is the kind of effect I need. If I use your example (using rowspan=2) then I'd have the problem (as labled in the inital post) of *Data2* cell being stretched when *Data1* +*Data2* height is less than *Menu* Maybe what the real problem is that you are using a table for layout when you should be using something else. If you rowspan the left column cell and the right column you add data that expand the cells vertically it is "natural" table behavior for the left column rowspan'ed cell to also expand vertically Now looking into my crystal ball I see that the left cell you put the word "menu" so chances are you have a *list* of menu items. If it a list you should use a list! If you want it side by side with your data then float it left. Google "2 column css layout template" -- Take care, Jonathan ------------------- LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com |
CSS approach looks like its![]() |
| Thread Tools | |
| Display Modes | |
| |