Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Make text appear to the right of a picture

<div style="float: left;">
    <img src="image.png"/>
    <div style="font-size: 100px;">Health And Wellbeing</div>
</div>

When I run this code, the words appear underneath the picture, is there any way to make the words appear to the right of the text?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I am not sure why your container div has float: left; in its styles, but you can use Flexbox to arrange the contents with more flexibility.

Here’s a simple example:

<div style="float: left; display: flex;">
    <img src="https://picsum.photos/seed/picsum/200/300" />
    <div style="font-size: 100px;">Health And Wellbeing</div>
</div>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading