[英]Tinymce echo Images next to each other instead below
I have a MYSQL database where I store images for reports I can import them to the Tinymce text area but they are being placed below each other.我有一个 MYSQL 数据库,我在其中存储报告图像 我可以将它们导入 Tinymce 文本区域,但它们被放置在彼此下方。 Is there away I can make them place two two next to each other.有没有我可以让他们两个并排放置。 Some reports have 2 photos and other might have 10 depending on how many was loaded to the DB一些报告有 2 张照片,而其他报告可能有 10 张照片,具体取决于加载到数据库的照片数量
This is my current code:这是我当前的代码:
$result = mysqli_query($db, "SELECT * FROM images WHERE file_nr = '$id'");
?>
<?php
while ($row = mysqli_fetch_array($result)) {
echo "<div id='img_div'>";
echo "<img width='300' height='300' display: inline-block;
src='../../cases_1/overdue/images/".$row['image']."' >";
echo "<p>".$row['image_text']."</p>";
echo "</div>";
}
?>
I tried inline-block not working.我试过内联块不起作用。
I don't think this is the cleanest method but got this working我认为这不是最干净的方法,但可以正常工作
<?php
while ($row = mysqli_fetch_array($result)) {
echo "<div id='img_div'>";
echo "<img width='350px' height='350px' style='float: left; padding: 4px;' src='../../cases_1/overdue/images/".$row['image']."' >";
echo "</div>";
}
?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.