I am struggling to keep two divs side-by-side within a parent div. Initially, I was able to position the image in the right div successfully, but when resizing the elements, everything became disorganized and I can't seem to fix it. As a beginner, I would appreciate if you could provide a simple solution.
div.surf2
{
position:absolute;
background: #41c3ac;
height: 600px;
}
div.surfleft
{
display: inline-block;
width: 45%;
padding-top: 80px;
padding-left: 20px;
height: 600px;
}
div.surf2right
{
display: inline-block;
height: 600px;
width: 55%;
}
<div class="surf2">
<div class="surfleft">
<p class="title1">Interactive games</p>
<ul style="font-size: 1.5em">
<li>We offer various games for you to enjoy, including object recognition exercises, multiple-choice quizzes, and error-spotting challenges.</li>
<li>These games are designed to make learning English engaging and rewarding.</li>
</ul>
</div>
<div class="surf2right">
<img src="console.png">
</div>
</div>