【发布时间】:2017-01-27 14:35:17
【问题描述】:
我的 php 页面中有一个 div,如下所示
<div class="col-md-16" id="">
<div class="textwidget">
<?php while ($row = mysqli_fetch_array($queryResult)) { ?>
<div style="margin-bottom: -15px; margin-right: 20px; background-color: #008086;">
<img class="alignnone wp-image-401" src="uploads/2016/12/homa-1-300x199.png" alt="" width="56" height="37" style="margin-bottom: -19px;" />
<span class="About-us-Description" style="color: #ffffff;"><?php echo $row['Name'] ?></span><hr>
</div>
<div class="textwidget">
<?php
$query1 = "Select * from rituals where ritualtypeid=".$row['ritualtypeid'];
$queryResult1 = mysqli_query($dbcon, $query1);
?>
<?php while ($row1 = mysqli_fetch_array($queryResult1)) { ?>
<div class="Homas">
<a style="color: #000000;" href="">
<i class="fa fa-angle-right"></i> <span class="what-we-offer" style="color: #000000;">
<?php echo $row1['Name'] ?>
</span>
</a><br />
</div><?php } ?>
</div><?php } ?>
</div>
</div>
它会将结果显示为
**Heading1**
Content1
Content2
**Heading2**
Content3
Content4
**Heading3**
Content5
Content6
**Heading4**
Content7
Content8 so on
但实际上我想展示的是
**Heading1** **Heading2** **Heading3**
Content1 Content3 Content5
Content2 Content4 Content6
---------------------------------------------------
**Heading4**
Content7
Content8 so on
在 3 个 div 之后,我需要换行,然后 div 应该出现在下一行。怎么做。任何帮助表示赞赏。
【问题讨论】:
-
所以... twitter bootstrap,12 宽.. 一行 3 列,数量为 4.. 并为下一行定义一个新 div?
-
你在使用引导程序吗? “col-md-16”那个类存在吗?
-
@AngryCoder 当然不是。
标签: php html css twitter-bootstrap