php - How can I display the 2 images and and their names horizontally? -


this main problem of system can display images , names cant't horizontal.. need pleasehere's example pic. cause when run codes images vertically want in horizontal

here;s code:

echo'<?php $src=array("candidates/images/".$rows["image"]); for($i=0;$i<2;$i++){ ?>';                              echo '<div clas ="image">';                                         echo '<img src="candidates/images/'.$rows['image'].'" width="10" height="20px" />'.',&nbsp;'.'<br>'.$rows['lastname'].',&nbsp;'.$rows['firstname'].'<br>'.'&nbsp;=&nbsp;'.$rows['votes'];                                           //  echo '<br>';                                         }                                              $sdsd=$dsada                                             ?>                                     <img  src="candidates/images/percent.gif"width='<?php echo(100*round($rows['votes']/($sdsd),2)); ?>'height='10'>                                 <?php                                  if ($rows['votes']==0){                                 echo "<br>";}                                 else {                             //  echo(100*round($rows['votes']/($sdsd),2)); /                             /*?>%<br>*/     /*<?php                             }                             */echo '</div>';                         }                         } 

here's css:

.image {   position: relative;   width: 150px;   display: inline-bloxk; } 

remove <br> ?

echo ''.', '.'
'.$rows['lastname'].', '.$rows['firstname'].'
'.' = '.$rows['votes'];


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -