Home > Mobile >  Floating an image to the left with text to its bottom right
Floating an image to the left with text to its bottom right

Time:10-05

what I have so far I'd like to make my text align from the bottom of the img.

Like below :

what i'd like to do

Do somebody knows how to make that trick ?

CodePudding user response:

Use flexblox on the wrapping element, and you can then justify/align the items as needed.

<div style="display:flex;align-items:end;">
  <div style="width:100px;height:100px;background-color:gray">Replace this div with image tag</div>
  <span>Text text text</span>
</div>

Click here to see codepen example.

  • Related