2016-06-01 5 views
-1

なぜ画像が画像の右に表示されないのですか?私は1 divにすべてを入れてみましたが、どちらもうまくいきません。画像の隣にテキストを置く

<div class="modal fade" id="mijnModel<?=$row['ID'];?>" role="dialog"> 
<div class="modal-dialog modal-lg"> 
    <div class="modal-content"> 
     <div class="modal-header"> 
      <button type="button" class="close" data-dismiss="modal">&times;</button> 
      <h4 class="modal-title"><?php echo $row ['product_naam'] ?></h4> 
     </div> 

     <div class="modal-body" style="height: auto;"> 
      <img src="/product_images/<?php echo $row ['product_afbeelding'] ?>" style="width:250px; height:250px;"> 
      <h2 style="margin-left: 350px; float: right;">Prijs: <?php echo "<td>" . "€" . $row['product_prijs'] . "</td>"; ?></h2> 
      <br> 
      <p style="margin-left: 350px;float: right; margin-top: -50px;"><strong>Omschrijving:</strong> 
       <?php echo "<td>" . $row[ 'product_omschrijving'] . "</td>"; ?> 
      </p> 
      <br> 
      <p><strong>Specificaties:</strong> 
       <?php echo "<td>" . $row[ 'product_specs'] . "</td>"; ?> 
      </p> 
      <br> 
     </div> 
     <div class="modal-footer"> 
      <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> 
     </div> 
    </div> 

</div> 

enter image description here

答えて

1

フロート画像の内容が正しい。ブートストラップを使用して失敗し、コンテナの行と列を使用します。これにより、よりきれいになります。

0

使用位置絶対マージン左:350px;

<h2 style="margin-left: 350px;position: absolute;">Prijs: <?php echo "<td>" . "€" . $row['product_prijs'] . "</td>"; ?></h2> 
関連する問題