Problem1:Image in Div will show weird bottom gap
in situation like <div><img src='yourImage'></div> ,weird gap show up in the bottom of img.
Image in default setting are set as 'display:inline-block', so use 'display block' then you can wrap div closely around the image
Problem2:How to set height of div the same as total heights of contain?
Don't use height:auto; Use overflow:auto;
Problem3: 2 div in a row , and widths of div are 35% and 65% of container div(the row)
html:
<div>
<div id='rightOne'></div>
<div id='leftOne'></div>
</div>
css:
#rightOne{
float:left;
width:35%;
}
#leftOne{
float:right;
width:65%;
}
note: Setting margin to rightOne div or leftOne div may cause lack of width and divs would not be in the same row.
Problem2:How to set height of div the same as total heights of contain?
Don't use height:auto; Use overflow:auto;
Problem3: 2 div in a row , and widths of div are 35% and 65% of container div(the row)
html:
<div>
<div id='rightOne'></div>
<div id='leftOne'></div>
</div>
css:
#rightOne{
float:left;
width:35%;
}
#leftOne{
float:right;
width:65%;
}
note: Setting margin to rightOne div or leftOne div may cause lack of width and divs would not be in the same row.