Place your two child divs inside a container div then give both child divs float:left;
property will display both child divs side by side.
Here is the code:
CSS
.container {
height:auto;
width:auto;
}
.image{
float: left;
padding-left: 25%;
padding-top: 20px;
}
.side-menu{
float: left;
}
HTML
<div class="container">
<div class="image">
<img src="https://stackoverflow.com/questions/42244525/egg.jpg" width="400" height="400">
</div>
<div class="side-menu">
<h1>Ingredients</h1>
<p>
2 eggs<br>
2 tbsp (30 mL)milk (1%)<br>
Pinch salt<br>
Pinch pepper</p>
</div>
</div>
1
solved How do I align this?