gothwalk: (Default)
gothwalk ([personal profile] gothwalk) wrote2005-08-31 04:46 pm
Entry tags:

Impossible? CSS Geekery

I have a feeling that this is in fact impossible, but here goes.

If I have two divs - columns, in effect - sitting side by side within a containing div, is there any way to get an element within the div-with-shorter-content to float to the bottom? The left-hand div is a reliable amount of content; the right could be shorter or longer than it. Each one contains, among other things, a button that has to drop to the bottom of the containing div.

Dammit, it's even hard to explain.

[identity profile] ocultado.livejournal.com 2005-08-31 03:58 pm (UTC)(link)
Yes, but it will be mid to late September before i have the time to explain it to you.

[identity profile] loupblanc.livejournal.com 2005-08-31 04:04 pm (UTC)(link)
you could try this:

give the container div the attribute overflow: auto, this will have the affect of pulling the background of the container div to the height of the longest column.

if you want to have elements, such as buttons, aligned at the bottom, I would put them in their own div under the two columns with a width the same as the container div. Unless of course this would completely mess up your form.

Hope this helps

[identity profile] smarriveurr.livejournal.com 2005-08-31 05:14 pm (UTC)(link)
I'll second [livejournal.com profile] loupblanc, if that approach can be used, do it. Alternately, I suppose you could nest a div inside the shorter column with a relative position setting from the bottom? This is assuming, if the content of the longer is fixed length, the divs are expressly defined in size, so you would in fact know how far down to set your buttons. It's been a while since I went into the guts of CSS, so I can't promise this would be a fruitful pursuit, but it's an option that springs to mind.