DO YOU NEED A CONTENT WRITER FOR YOUR BUSINESS?

Your One-Stop Solution for All Content Needs! Click here for more!
Categories: Css

Align text vertically next to an image

Share

Need to Align text vertically next to an image? Here is a simple way to align text vertically that is also next to an image.

Actually, this is quite simple. Apply the align to vertical to the image. Since it is all in one line, so, this is really the image that you want aligned rather than the text.

Suppose, you have a image tag and a text next to the image. So, wrap both within a div.

For example, you have below image tag:

<img src="image.jpg">

And a text:

<span style="">This is working</span>

Read Also: Horizontally center a div within a div

So, wrap both in a div and apply the below css rule.

<div>
<img src="image.jpg" style="vertical-align:middle;">
<span style="">This is working</span>
</div>

Result:

CSS Designer

Recent Posts

How Did The Restaurant Industry change In Post Pandemic Era?

The coronavirus outbreak has drastically changed the way we live our lives. Yes, that's absolutely…

1 day ago

A Guide To CPQ and How It Fuels Marketing and Sales

Sales and marketing teams help attract, convert, and retain customers to ensure an organization’s long-term…

1 week ago

Top Questions Asked About Invoice Financing Applications

Are you an owner of a small business who’s trying to come up with ways…

2 weeks ago

Complete Medical Guide to Blood Sugar Testing and Glucose Control

Introduction When patients bring me their lab reports, the confusion is almost always the same.…

3 weeks ago

6 Tips to Strategically Remodel Your Home

Are you excited about remodeling your house after a long time? Perhaps if you're planning…

3 weeks ago

Driving Finding Balance on and off the Mat: How Calm Awareness Supports Everyday

The practice of yoga teaches us to be present, patient and mindful of our decisions.…

3 weeks ago