last day (14 days later) » 

6:09 AM
0
Q: Align products in Grid type instead of list?

user3289108I've a issue in displaying products in Grid type. Instead of Grid type, all the products are arranged in left side in top-to-bottom format. I've a div called content which displays list of products in left side and cart items on right side. The code for to display products: <div id="content">

 
@JJPA Yes done. But the result is same.
I'm not actually expert in positioning & float. May be i can solve if you help. But it works well in html when we give date in static. This alignment issue arises while only when i fetch data from database.
 
i think you should also check for changing css during fetch in developer mode of browser
 
@himanshu Oh. Where do you think that i've to change css? I mean in which div?
 
i m not saying to change css i am talking to check with F12 on browser
 
Yes, i did. The first item takes the width that i've mentioned in css. i.e 210px. After that, the next items is going down and displaying it.
 
6:09 AM
did you remove display: block;
 
Yes i did.
I just can't figure out where the problem exists
 
can you provide the test site link
 
okay..i'll upload in some site and will give u link shortly
is there anything like Jsfiddle for php mysql?
 
no i dont think so
 
Oh okay..i'll give u link shortly in minutes
 
6:39 AM
Here is the link testdomain56.host56.com
Access CP here : members.000webhost.com
email : yuvaraj@bizopp.in
password: asdf1234
are u there?
 
yes i am checking it
 
Oh okay
 
i didnt see any particular problem
 
Lol
 
ok i got the problem your divs are not closing properly
 
6:53 AM
ok try and tell me
whether it works or not
 
<div id="content-wrapper">

<div id="content">
<h2>Spices</h2>


<div class="product1">

<h3>Black Pepper </h3>
<img src="images/bp.png" width="170" height="140">
<p>Starting from <span> Rs. 200.00 </span></p>
<div id="imgad">
<a href="#"><img src="images/add-to-cart.png"></a>
</div>
</div> // this is missing
<div class="product1">

<h3>Cardamom</h3>
<img src="images/bp.png" width="170" height="140">
<p>Starting from <span> Rs. 230.00 </span></p>
<div id="imgad">
<a href="#"><img src="images/add-to-cart.png"></a>
every product1 div is not closed at all
 
well, then what should i do now
Need to remove em?
 
are you creating product1 div dynamically
 
Got it, now working..Thanks
 
or just entering values
ok
good work then
 
6:59 AM
The problem is put the product closing div after while loop
 
happy to help
 
:D
I'll give you reputation..Just edit your answer in post
 
ok
 

last day (14 days later) »