Php Mysql结果没有正确对齐
我有一个引导购物车,我正试图添加到我的网站,问题是表单的第一行非常完美(四对一行),但是第二行分割其结果,一行两个,另一行两个 我可以得到的结果显示每行两个完美没有任何错误。但我似乎无法得到四列的正确结果 可在此处找到该网站的链接 网页中的HTML和PHPPhp Mysql结果没有正确对齐,php,css,Php,Css,我有一个引导购物车,我正试图添加到我的网站,问题是表单的第一行非常完美(四对一行),但是第二行分割其结果,一行两个,另一行两个 我可以得到的结果显示每行两个完美没有任何错误。但我似乎无法得到四列的正确结果 可在此处找到该网站的链接 网页中的HTML和PHP <section class="products" data-image=""> <?php // // Show Product Grid // if (isset($_GET['category'])) {
<section class="products" data-image="">
<?php
//
// Show Product Grid
//
if (isset($_GET['category'])) {
$category = $_GET['category'];
} else {
$category = 1;
} // list category from table bsc_category
$shoppingcart_vertical = 0; // if the is vertical shoppingcart_vertical=1 / is top or bottom are horitzontal -> shoppingcart_vertical=0
$_SESSION['LastProductPage'] = $_SERVER["REQUEST_URI"]; // take the name of this page for return
include "BootstrapShoppingCart/products_grid.php"; // list products
//
// Show Product Grid
//
?>
</section>
以下代码是形成结果的部分,是产品网格页面内容的一部分。我遗漏了sooe代码,但这只是查询,不认为它有任何关系
<div class=".col-md-3" data-id="<?php echo $thisproduct[0] ['id_product']; ?>" data-type="<?php
if (count($thisproduct)>1) {
echo 'select'; // are selection/type?
}
?>" data-quantity="1">
<div class="thumbnail">
<img src="assets/<?php echo $thisproduct[0]['img']; ?>" alt="<?php echo $thisproduct[0]['name']; ?>" class="img-responsive">
<div class="caption">
<p>
<?php
echo $thisproduct[0]['name'] . "<br />"; // display name product
$price = new getprice($rs['id'], 0); // first its id->product second id->type
$price_array = $price->get(); // getting price [0] = no offer price [1]= offer price
if (count($thisproduct)==1) { // its only 1 product or ... have types ?
if ($thisproduct[0]['price'] > 0) { // have price ?
if ($thisproduct[0]['offer']) { // this a offer ?
echo '<span class="price_overline">' . moneyformat($thisproduct[0]['price']) . '</span>';
echo '<span class="offer"> ' . moneyformat($thisproduct[0]['price_offer']) . '</span>';
} else {
echo '<span class="price">' . moneyformat($thisproduct[0]['price']) . '</span>';
}
} else {
echo '<span class="price"> </span>'; // are price 0 then
}
} else {
echo '<span class="offer"> </span>';
}
?>
</p>
<?php
if (count($thisproduct)>1) {
?>
<select class="form-control combobox_type" style="margin-bottom: 6px;">
<option value="select" selected>Select ...</option>
<?php foreach ($thisproduct as $type) {
if ($type['id_type']>0) {
?>
<option value="<?php echo $type['id_type']; ?>"><?php
echo $type['name_type']. ' ';
// its type w price ?
// display price type ... like iphone 16gb/32gb/64/gb
if ($type['offer']) { // this a offer ?
echo '<span class="price_overline">' . moneyformat($type['price']) . '</span>';
echo '<span class="offer"> ' . moneyformat($type['price_offer']) . '</span>';
} else {
echo '<span class="price">' . moneyformat($type['price']) . '</span>';
}
?></option>
<?php } // foreach types
} // its a type? ?>
</select>
<?php
} else { // options
echo '<div style="height: 40px;"></div>'; // i make a offset
}
?>
<p align="center">
<?php if ($shoppingcart_vertical) { ?>
<a href="#" class="btn btn-success addproduct"><i class="icon-shopping-cart"></i>Add</a>
<?php } else { ?>
<a href="#" class="btn btn-success addproduct-horizontal"><i class="icon-shopping-cart"></i>Add</a>
<?php } ?>
</p>
</div>
</div>
</div>
“class=”img responsible“>
选择。。。
对于初学者来说,在HTML代码的第一行,您的class属性中似乎有一个额外的
(谢谢,我试过了,我以前也试过,只是试过我能想到的任何东西。
<div class="row">
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
</div>
<div class="row">
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
</div>
<div class="row">
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
<div class="col-md-3">Content</div>
</div>