如何调整Yii2 listview的行间距
How to adjust the Yii2 listview row spacing
我的网页中有一个列表视图,例如
<?= ListView::widget([
'dataProvider' => $dataProvider,
'summary'=>false,
'itemView' => '_listing'
]);?>
我的列表项是
<li>
<div class="well ad-listing clearfix">
<div class="col-md-3 col-sm-5 col-xs-12 grid-style no-padding">
<!-- Image Box -->
<div class="img-box">
<img src="<?=Yii::getAlias('@web/frontend/web/')?>uploads/<?=$boatModel->getThumbnail($model->pictures)?>" class="img-responsive" alt="">
<div class="total-images"><strong><?=$boatModel->getPictureCount($model->pictures)?></strong> photos </div>
</div>
</div>
<div class="col-md-9 col-sm-7 col-xs-12">
<!-- Ad Content-->
<div class="row">
<div class="content-area">
<div class="col-md-9 col-sm-12 col-xs-12">
<!-- Category Title -->
<div class="category-title"> <small><b><?=$model->mainCategory->category_english?> / <?=$model->category->category_english?></b></small> </div>
<div class="category-title"> <small><b><?= date("jS F, Y", strtotime($model->date)); ?></b></small> </div>
<!-- Ad Title -->
<h3><?=yii\helpers\Html::a($model->title, ['community/view', 'id' => $model->id]) ;?></h3>
<!-- Info Icons -->
<!-- Ad Meta Info -->
<ul class="ad-meta-info">
<li> <i class="fa fa-map-marker"></i><a href="#"><?=$model->address?></a> </li>
</ul>
<!-- Ad Description-->
<div class="ad-details">
</div>
</div>
<div class="col-md-3 col-xs-12 col-sm-12">
<!-- Ad Stats -->
<br>
<!-- Price -->
<div class="price"> <span></span> </div>
<span><a href="#fav"><i class="fa fa-star-o"></i> </a></span>
<span><a href="#fav"><i class="fa fa-flag-o"></i></a></span>
<!-- Ad View Button -->
</div>
</div>
</div>
<!-- Ad Content End -->
</div>
</div>
</li>
我的输出就像 please see the image
我想删除列表视图 items.How 之间的 space 可以做 that.i 无法通过检查 属性 找到
<div class="well ad-listing clearfix" style="margin-bottom:5px">
在列表项页面添加样式margin-bottom
或在 css
中编辑
我的网页中有一个列表视图,例如
<?= ListView::widget([
'dataProvider' => $dataProvider,
'summary'=>false,
'itemView' => '_listing'
]);?>
我的列表项是
<li>
<div class="well ad-listing clearfix">
<div class="col-md-3 col-sm-5 col-xs-12 grid-style no-padding">
<!-- Image Box -->
<div class="img-box">
<img src="<?=Yii::getAlias('@web/frontend/web/')?>uploads/<?=$boatModel->getThumbnail($model->pictures)?>" class="img-responsive" alt="">
<div class="total-images"><strong><?=$boatModel->getPictureCount($model->pictures)?></strong> photos </div>
</div>
</div>
<div class="col-md-9 col-sm-7 col-xs-12">
<!-- Ad Content-->
<div class="row">
<div class="content-area">
<div class="col-md-9 col-sm-12 col-xs-12">
<!-- Category Title -->
<div class="category-title"> <small><b><?=$model->mainCategory->category_english?> / <?=$model->category->category_english?></b></small> </div>
<div class="category-title"> <small><b><?= date("jS F, Y", strtotime($model->date)); ?></b></small> </div>
<!-- Ad Title -->
<h3><?=yii\helpers\Html::a($model->title, ['community/view', 'id' => $model->id]) ;?></h3>
<!-- Info Icons -->
<!-- Ad Meta Info -->
<ul class="ad-meta-info">
<li> <i class="fa fa-map-marker"></i><a href="#"><?=$model->address?></a> </li>
</ul>
<!-- Ad Description-->
<div class="ad-details">
</div>
</div>
<div class="col-md-3 col-xs-12 col-sm-12">
<!-- Ad Stats -->
<br>
<!-- Price -->
<div class="price"> <span></span> </div>
<span><a href="#fav"><i class="fa fa-star-o"></i> </a></span>
<span><a href="#fav"><i class="fa fa-flag-o"></i></a></span>
<!-- Ad View Button -->
</div>
</div>
</div>
<!-- Ad Content End -->
</div>
</div>
</li>
我的输出就像 please see the image
我想删除列表视图 items.How 之间的 space 可以做 that.i 无法通过检查 属性 找到
<div class="well ad-listing clearfix" style="margin-bottom:5px">
在列表项页面添加样式margin-bottom 或在 css
中编辑