Be the first user to complete this post

  • 0
Add to List

css - align text to an image vertically

Have you ever wanted to align the text next to an image vertically? It can be done using vertical-align property as shown below. Here, we show how to align the text to top, middle, and bottom of the image. [codepen_embed height="266" theme_id="0" slug_hash="EKdOBZ" default_tab="html,result" user="kavitshah8"]See the Pen vertical-align by Kavit Shah (@kavitshah8) on CodePen.[/codepen_embed]

Also Read:

  1. position: relative
  2. Getting started with localStorage vs sessionStorage in html5
  3. position:fixed
  4. css : center element vertically and horizontally
  5. Difference between async and defer attributes in script tags
  6. Two column layout in css
  7. gzip compress and cache api response in express
  8. Progressive enhancement vs Graceful degradation