i am trying to put some text with h3 as a title parallel to an image
i managed to get the image and the text to do that, the problem is i cant get my h3 on top of the text
#box {
display: flex;
align-items: center;
width: 950px;
margin:auto;
margin-top: 30px;
}
#box p {
margin-right: 1em;
}
<div id="box">
<h3>lorem ipsum</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
</p>
<img width="300" src="https://blog-media.byjusfutureschool.com/bfs-blog/2022/08/18080659/Article-Page-61.png" />
</div>
This is what i want it to essentialy look like with the h3 as title
3
Answers
This should do the trick:
You can simply wrap your text content in an additional div: