how to keep the height of the div equal to the union of the height of elements inside it
- by Idlecool
I have been making a wordpress template. i got stuck at some place...
the problem is,
how to maintain the size of a div = the size of p tags and img tags...
i have seen that the div only able to contain the p tag but the img tag over flows...
i have my code in this following order:
<div>
<p> some contents <img src="an_image"/> some morecontent</p>
<div>
what i basically want is:
div height = <p> height U(union) <img> height
but, what actually i am getting is:
div height = <p> height; while <img> over flows
i have already checked for similar questions on Stack Overflow but was not able to find one which solves a similar problem..
please give me some idea..