How do I get a div to float to the bottom of its container?
Posted
by Stephen Martin
on Stack Overflow
See other posts from Stack Overflow
or by Stephen Martin
Published on 2008-11-23T01:29:04Z
Indexed on
2010/06/08
0:42 UTC
Read the original article
Hit count: 274
I have floated images and inset boxes at the top of a container using float:right (or left) many times. Recently I hit a need to float a div at the bottom right corner of another div with the normal text wrap that you get with float (text wrapped above and to the left only).
I thought this must be relatively easy even though float has no bottom value but I haven't been able to do it using a number of techniques and searching the web hasn't come up with anything other than using absolute positioning but this doesn't give the correct word wrap behaviour.
I had thought this would be a very common design but apparently it isn't. If nobody has a suggestion I'll have to break my text up into separate boxes and align the div manually but that is rather precarious and I'd hate to have to do it on every page that needs it.
© Stack Overflow or respective owner