× -6ren">
gpt4 book ai didi

php - 在图像旁边放置文本

转载 作者:行者123 更新时间:2023-11-28 17:29:23 24 4
gpt4 key购买 nike

为什么我的文字没有显示在图片的右边?我试过将所有内容放在 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

最佳答案

float 图像内容。如果失败,请使用 Bootstrap 并使用容器行和列。这将使它更清洁。

关于php - 在图像旁边放置文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37564809/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com