Proplem in div right align?

Mefi

New Member
i have php program that contain div main_wrapper that div have two sub div resultwrapper and adv_right. I want adv_right div exactly right side of the resultwrapper div.When i'm use float mean that div present outside of the main_wrapper div.\[code\]<style>.resultwrapper{width:990px; margin: 10px auto 10px auto; clear:both; }.resultitem{ float: left; height: 170px; margin-bottom: 0px; margin-left: 10px; min-height: 130px; width:218px;}.resultleftitem{padding-left:0;margin-left:0px;}.resultitem img{border:dotted 1px #666; padding:6px;}.resultitem img:hover{border:solid 1px #F60;}.resultitem h4{font-size:12px; font-weight:bold; color:#249ce9; margin-top:5px; }.resultitem a{color:#249ce9;}.resultitem .caption{color:#9c9c9c; font-size:12px; display:block; margin-top:6px; text-align:justify;}</style><div class="main_warpper"><div class="resultwrapper"><?php while($row = mysql_fetch_array($rs)) { $id=$row['id']; $type=$row['type']; $location=$row['location']; if(file_exists("properties//". $imageloc ."//thumb.jpg") ) { $thumb_img="properties/". $imageloc ."/thumb.jpg"; } else { $thumb_img="images/default.jpg"; } if($cnt==0 || $cnt ==4 ) $newResult=true; else $newResult=false; ?><div id="parent" > <div class="resultitem <?php if($newResult) echo ' resultleftitem'; ?>" id="resultitem"> <a href="http://stackoverflow.com/questions/15872342/viewpropdetails.php?id=<?php echo $id;?>" target="_blank"> <img id="parent" src="http://stackoverflow.com/questions/15872342/<?php echo $thumb_img; ?>" alt="<?php $new=strtolower($heading); echo ucwords($new); ?>" title="<?php $new=strtolower($heading); echo ucwords($new); ?>" width="100" height="100" /></a> <div class="itemdetails"> <h4 id="linkheading"><a href="http://stackoverflow.com/questions/15872342/viewpropdetails.php?id=<?php echo $id;?>" target="_blank"><?php echo $type ." @ ".$location; ?></a></h4> <span class="box"><?php echo cropStr($desc,$MAX_DESC); ?></span> </div> </div> </div><?php $cnt++; } ?></div><div class="adv_right" style=" clear:both; width:15%; float:right;height:300px; background-color:#999999;"> </div></div> \[/code\]
 
Top