"Responsive Shopping Cart"
Bootstrap 3.2.0 Snippet by asanti82

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> <div class="container"> <table id="cart" class="table table-hover table-condensed"> <thead> <tr> <th style="width:50%">Product</th> <th style="width:10%">Price</th> <th style="width:8%">Quantity</th> <th style="width:22%" class="text-center">Subtotal</th> <th style="width:10%"></th> </tr> </thead> <tbody> <tr> <td data-th="Product"> <div class="row"> <div class="col-sm-2 hidden-xs"><img src="http://placehold.it/100x100" alt="..." class="img-responsive"/></div> <div class="col-sm-10"> <h4 class="nomargin">Product 1</h4> <p>Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet.</p> </div> </div> </td> <td data-th="Price">$1.99</td> <td data-th="Quantity"> <input type="number" class="form-control text-center" value="1"> </td> <td data-th="Subtotal" class="text-center">1.99</td> <td class="actions" data-th=""> <button class="btn btn-info btn-sm"><i class="fa fa-refresh"></i></button> <button class="btn btn-danger btn-sm"><i class="fa fa-trash-o"></i></button> </td> </tr> </tbody> <tfoot> <tr class="visible-xs"> <td class="text-center"><strong>Total 1.99</strong></td> </tr> <tr> <td><a href="#" class="btn btn-warning"><i class="fa fa-angle-left"></i> Continue Shopping</a></td> <td colspan="2" class="hidden-xs"></td> <td class="hidden-xs text-center"><strong>Total $1.99</strong></td> <td><a href="#" class="btn btn-success btn-block">Checkout <i class="fa fa-angle-right"></i></a></td> </tr> </tfoot> </table> </div>
.table>tbody>tr>td, .table>tfoot>tr>td{ vertical-align: middle; } @media screen and (max-width: 600px) { table#cart tbody td .form-control{ width:20%; display: inline !important; } .actions .btn{ width:36%; margin:1.5em 0; } .actions .btn-info{ float:left; } .actions .btn-danger{ float:right; } table#cart thead { display: none; } table#cart tbody td { display: block; padding: .6rem; min-width:320px;} table#cart tbody tr td:first-child { background: #333; color: #fff; } table#cart tbody td:before { content: attr(data-th); font-weight: bold; display: inline-block; width: 8rem; } table#cart tfoot td{display:block; } table#cart tfoot td .btn{display:block;} }

Similar snippets: See More


Rgbskills 2014-09-15 11:01:39
    Love it, Nice work!
iRsHAad MaX 2014-09-18 17:05:36
    Just one i want....thnks... love it
Tariq Kadir 2014-10-15 02:13:45
    great work ...love it
Antonio Pereira 2014-10-20 12:33:34
    Looks great !
Fernando Tholl Nascimento 2016-04-11 02:18:20
    Very good, thank you
Wisdom Clement 2016-05-20 14:28:34
    hello, Assuming a customer has finished shopping and clicks on checkout, how do i validate it?
Lav Patel 2017-03-09 03:03:08
    validation has to be on the sever side otherwise one can easily manipalate the values on the client side

Commenting will be back soon.