【问题标题】:Displaying images horizontally or 4images per row in php在php中水平显示图像或每行4张图像
【发布时间】:2018-02-01 14:41:42
【问题描述】:

<?php 
                                    $query1=mysqli_query($db_con,"select * from image_tb");
                                    while($row=mysqli_fetch_array($query1)){
                                 ?>
                            </div>
                            <div class="block-content collapse in">
                                <div class="row-fluid padd-bottom">
                                  <div class="span3">
                                      <a href="#" class="thumbnail">
                                        <img src="<?php echo $row['img_location'];?> "  alt="260x180" style="width: 260px; height: 180px;">
                                      </a>
                                  </div>
                                  
                                  
                                  <?php
                                        }
                                    ?>

1[我需要水平显示图像但是所有图像都是垂直显示的。]

here's the image vertically displayed

it should be display like this

【问题讨论】:

  • 这甚至不是一个问题。我们不会为你做你的工作。向我们展示您迄今为止所做的尝试。提示 - 使用 CSS 进行样式设置。

标签: php html css


【解决方案1】:

我认为你的问题不在于代码,而在于样式,对吧?

在 CSS 上:

img {
  float: left;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-15
    • 1970-01-01
    • 2013-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-20
    相关资源
    最近更新 更多