VALIGN TOP and BOTTOM in same cell?

They have: 601 posts

Joined: Nov 2001

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

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. Smiling

Suzanne's picture

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!

Smiling Suzanne

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's picture

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)

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.