CSS, How do i do this? :(

Associate
Joined
22 Aug 2004
Posts
462
Location
East Sussex
I've been racking my brains with how to do this in CSS. I could do using tables at the drop of a hat, but that would defeat the object wouldnt it ;)

I have what can be described in table terms as a table with two columns. the left column is coloured yellow, while the right column isnt. The right column contains an image.

This is where I'm having trouble ->

The left column needs to be resized to meet the height of the right column if the picture in the right column is taller than the left. Using tables it will automatically resize it, but I cant manage to crack it with css.

Any ideas? :mad:
 
You can also do it by using a container div which has the same background colour as the left column, assuming that the right column will always be longer... has the added benefit of being fluid width.
 
LazyManc said:
You can also do it by using a container div which has the same background colour as the left column, assuming that the right column will always be longer... has the added benefit of being fluid width.

Ah, I forgot to mention that, the right column isnt always longer, so, the left column is a fixed height (possibly taller than the image) unless the image on the right is taller, in which case its resized to fit.

Thanks for the link, ill give it a try and let you know.
 
Back
Top Bottom