Click here to Skip to main content
14,579,188 members
Rate this:
Please Sign up or sign in to vote.
See more:
The grid item does not display in a row(horizontal), which means it echo only one grid item in a row(horizontal). At least I want to make it echo each row have 3 grid item. Help me please

What I have tried:

<div id="products" class="row list-group">
        <div class="item  col-xs-4 col-lg-4">
            <div class="thumbnail">
                <img src="<?php echo $row['file_path']; ?>" alt="" width='200' height='200' class="group list-group-image" />
                <div class="caption">
                    <h4 class="group inner list-group-item-heading">
                  <?php echo $row['tittle']; ?></h4>
                    <p class="group inner list-group-item-text">
                        Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
                        sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
                    <div class="row">
                        <div class="col-xs-12 col-md-6">
                            <p class="lead">
                                $21.000</p>
                        </div>
                        <div class="col-xs-12 col-md-6">
                            <a class="btn btn-success" href="">More</a>
                        </div>
                    </div>
              </div>
          </div>
        </div>
		
    </div>



$(document).ready(function() {
    $('#list').click(function(event){event.preventDefault();$('#products .item').addClass('list-group-item');});
    $('#grid').click(function(event){event.preventDefault();$('#products .item').removeClass('list-group-item');$('#products .item').addClass('grid-group-item');});
});
Posted
Updated 25-Jun-20 10:05am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

I am not sure I understand the question but why not use a <table>? It allows you complete control of rows and columns.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100