I have come across a strange issue that I am struggling to solve. I have an image within a div with the float: left;
attribute, but this styling only seems to work when the div has more than one line of text. When the div contains just one line, it ends up overlapping with the image. Any ideas on what might be causing this problem?
<div style="
overflow: hidden;
width: 600px;
border: 1px solid black;
padding: 5px;
font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
font-size: 14px;
">
<img src="images/monkey.jpg" style="
margin-right: 7px;
border: 1px solid #C0C0C0;
padding: 5px;
float: left;
height: 62px;
width: 80px;
">
<div style="
margin-top: -15px;
margin-bottom: -15px;
word-wrap: break-word;
">
<p>
I'm curious about your approach to handling short posts and similar content. What's your strategy?
</p>
</div>
</div>