Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Div Height = Image height. help

Reply
Thread Tools

Div Height = Image height. help

 
 
muggslab muggslab is offline
Junior Member
Join Date: Feb 2010
Posts: 2
 
      02-01-2010
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 ?
 
Reply With Quote
 
 
 
 
muggslab muggslab is offline
Junior Member
Join Date: Feb 2010
Posts: 2
 
      02-01-2010
my post got ignored
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
child div blocks parent div, height problem... HJ HTML 5 09-01-2006 04:37 PM
Change height of DIV when div border set marco_giuliani_it@hotmail.com Javascript 0 09-21-2005 02:42 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM
How to tell height of div where height is not set? Don Vaillancourt Javascript 8 01-31-2005 11:32 AM



Advertisments