Considering that I have 2 divs with images and text, I encountered some formatting issues when attempting to float the image to the left using float:left;. The strange formatting is ruining the layout. Below, I've included my code snippet along with a visual representation of the problem:
HTML
<div class="skills">
<h2>My Skills.</h2>
<div class="skill-row">
<img class="muscle"src="images/strong.png" alt="muscle">
<h3>Physical Capabilities</h3>
<p>I am physically fit, tall and lean from years of playing outside.</p>
</div>
<div class="skill-row">
<img class="brain" src="images/brainstorm.png" alt="brain">
<h3>Intelligence</h3>
<p>I am able to perform mathematical calculations with ease, and understand advanced concepts.</p>
</div>
</div>
CSS
.skill-row{
width: 50%;
margin: 100px auto 100px auto;
text-align: left; line-height: 2;
}
.muscle {
width: 25%;
float: left;
}
.brain {
width: 25%;
float: left;
}
Is there a solution to float the image to the left without disrupting the overall webpage layout?