Grow your CSS skills. Land your dream job.

Aligning text with bottom of image

  • # September 20, 2013 at 9:29 pm

    Hi forum,

    I am wondering how to align text with the bottom of an image.

    See example here: http://i.imgur.com/U8BrGKH.jpg

    I’m trying to keep it responsive, so the images take 85% of the parent div space, and the text will max out at 15%. How do you get the text to align with bottom.

    Any thoughts?

    Thank you!

    # September 20, 2013 at 10:58 pm

    Maybe try setting the parent div toposition: relative and the text element to position: absolute and bottom: 0 and right: 0

    # September 21, 2013 at 12:56 am

    Display: inline-block should be enough: http://codepen.io/anon/pen/cECLx

    # September 21, 2013 at 2:21 pm

    Hah over-engineered that one – nice @Paulie_D. :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".