Hello All
I am having a problem to get my div height = image height. I have did some searching on this forum (can't post links since I'm a new member
)
Unfortunately, the solution doesn't seem to be able to solve for my case.
My current Layout:
I have 2 divs
_____div1____|_____div2____|
I have used float:left to align div 1 and div 2 side by side. By placing an image within my div 1, part of the image is overlapping the area in div1. In other words, half of my image is appearing below of my div1 bottom border.
Hears the contents for my div 1:
<div id="msg-box">
blahh blahh blahh blahh......
<p><img ...></p>
</div>
I have tried using clear:both on <p style> but it doesn't solve the problem. Is there any solutions or alternative to cause my div 1 height to expand according to the number of images height totaled together ?
I am having a problem to get my div height = image height. I have did some searching on this forum (can't post links since I'm a new member
Unfortunately, the solution doesn't seem to be able to solve for my case.
My current Layout:
I have 2 divs
_____div1____|_____div2____|
I have used float:left to align div 1 and div 2 side by side. By placing an image within my div 1, part of the image is overlapping the area in div1. In other words, half of my image is appearing below of my div1 bottom border.
Hears the contents for my div 1:
<div id="msg-box">
blahh blahh blahh blahh......
<p><img ...></p>
</div>
I have tried using clear:both on <p style> but it doesn't solve the problem. Is there any solutions or alternative to cause my div 1 height to expand according to the number of images height totaled together ?