If you mean what I think you mean, you could put

.container { position:relative }

to make the container a containing-block, then use

.content { position:absolute; bottom:0 }

to make each content block sit snugly at the bottom of the container.
The problem is, unless you know in advance how high the containers
are, they won't expand to fit the content.

Another approach would be to give each h2 a fixed height (in ems).

I think this is one of those situations where anything you might do
will be a slight compromise. I never will know why vertical-align is
not specced to do this kind of thing.

Chris

On 11/14/06, Barney Carroll <[EMAIL PROTECTED]> wrote:
> A little idea I wanted to implement but am a bit confused about... Was
> wondering if anyone could see an obvious method.
>
> <div class="container">
>    <h2>Whatever</h2>
>    <div class= "content">
>      (content)
>    </div>
> </div>
>
> <div class="container">
>    <h2>Whatever whatever whatever whatever</h2>
>    <div class= "content">
>      (content)
>    </div>
> </div>
>
> .container has a very narrow set width - in the first instance, the
> header would fit in as one line. In the second it would have to wrap.
> .content has a top margin of a good deal, where the header fits - but in
> practical terms it has a fixed distance from the top of the container.
>
> I want h2 to hug the top of .content - ideally while remaining its
> sibling (ie without any extra markup). It has to be positioned relative
> (general term) to .content because in the instance of the header being
> several lines long, I would want it to extend as far as it might want
> upwards, while keeping its lowest point constant compared to .content,
> and without itself affecting .content at all.
>
> What I really want is float:bottom. Anyone know what I mean?
>

-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to