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 please. 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" />'.', '.'<br>'.$rows['lastname'].', '.$rows['firstname'].'<br>'.' = '.$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
Post a Comment