Working on a WordPress template and encountered a roadblock...
The issue at hand is:
How can I ensure that the size of a div is always equal to or greater than the combined size of p tags and img tags...
I noticed that the div only accommodates the p tag while the img tag overflows...
Here's the structure of my code:
<div>
<p> some contents <img src="an_image"/> some more content</p>
<div>
What I am aiming for is:
div height = <p> height U(union) <img> height
However, what I'm currently getting is:
div height = <p> height; while <img> overflows
I've searched for similar queries on Stack Overflow but couldn't find a solution specific to this problem. I'd appreciate any insights..
An update:
This is an excerpt from my code:
<div id="the_content">
<p><img class="alignright" src="http://i35.tinypic.com/990wtx.png" alt="WordPress Logo" align="right" />Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur quam augue, vehicula quis, tincidunt vel, varius vitae, nulla. Sed convallis orci. Duis libero orci, pretium a, <a href="#">convallis quis</a>, pellentesque a, dolor. Curabitur vitae nisi non dolor vestibulum consequat. <a href="http://localhost/wordpress/?p=55#more-55" class="more-link">(more…)</a></p>
</div>