I would like to have an image in my webpage. The image should be centered on the page, and it should have a text next to it on the right side like this:
My current CSS code to show an image centered is this:
.inlineimage {
text-align:center;
width:100%;
display:block;
margin:auto;
}
And I use it like this:
<div class="inlineimage">
<picture>
<source
media="(max-width: 900px)"
srcset="images/image1.jpg">
<img
src="images/image2.jpg"
alt="">
</picture>
</div>
This is some text that should be shown on the right side of the image, but currently it's shown below the image.
How could I change my CSS code in such a way that the text is shown on the right side of the image?
Thank you!