VALIGN TOP and BOTTOM in same cell?
Hi
I've got one column in my table which will eventually hold two images. I want to be able to valign the first image at the top and the second image right at the bottom. Is there any sure way to do this? I've tried cheating using multiple s but the end result looks different in every browser.
Has anyone conquered this problem?
- wil
Wil posted this at 17:17 — 23rd February 2002.
They have: 601 posts
Joined: Nov 2001
I figured out how to overcome my dilema. I created another outer table, and used ROWSPAN to controll the layout of the special cell.
Suzanne posted this at 19:26 — 23rd February 2002.
She has: 5,507 posts
Joined: Feb 2000
Another solution would be to use valign="bottom" for the bottom image and have the top image as a background. In plain HTML you'd need to make the image an insane length (whitespace), however with CSS you can set the background to not repeat, effectively putting it at the top of the cell and the other image at the bottom.
The only drawback would be if the cell was ever not held open far enough by the text in the neighbouring cell.
Less code is usually a better option than more, but you know that!
Suzanne
Wil posted this at 14:37 — 24th February 2002.
They have: 601 posts
Joined: Nov 2001
Hm. Good idea. Never thought of that one.
Although the way it is setup now, it is absolutely backwards-compatible and will display correctly on most browsers tested on - but your idea sounds much neater.
Here's the URL, FWIW. The column in question is the right hand one with two images, one at the top and one at the bottom.
http://penweddig.fbagroup.co.uk/blue.html
Rgds
- wil
Busy posted this at 20:26 — 24th February 2002.
He has: 6,151 posts
Joined: May 2001
until layers are accepted more widely, I think the only ral way to do thing like that is with table cells. site looks good (got a javascript error thou)
Wil posted this at 09:24 — 25th February 2002.
They have: 601 posts
Joined: Nov 2001
Yeah, never mind the Javascript error - that's another thread .
THanks for the positive feedback. Will post in the critique forum once completed.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.