How to achieve Bottom Align floated div that sizes to it's container.

Posted by Davy8 on Stack Overflow See other posts from Stack Overflow or by Davy8
Published on 2011-01-12T23:33:08Z Indexed on 2011/01/13 0:53 UTC
Read the original article Hit count: 123

Filed under:
|

How can I achieve the following layout? Specifically the positioning of Image and DIV

I've found that unless I set a specific width for the Div, it will just go on to the next line and take up the full width of the container. Additionally aligning it relative to the bottom of the image is giving me trouble. Currently they're both float:left

alt text

Edit: The two solutions so far work if the image is a constant width which I guess I could work with, but it's going in a Wordpress theme for an author's profile page and it's possible that images would have slightly variable widths. Is there a solution that would have the Div right next to the image (minus padding) regardless of how wide or narrow the image is? Basically having the div adjust its width to accommodate the image width.

© Stack Overflow or respective owner

Related posts about css

Related posts about vertical-alignment