CSS problem in html

Please have a look at Please have a look at
There are 8 product items on the page. It should show four product in first row and four products on 2nd row. instead, it shows 4+2+1+1 products in four rows.
It should show like this page.: http://just2test.in/smokestore/products.php?Show=1&page=1 
Please help me.
Rajesh JoshiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rajesh JoshiAuthor Commented:
Thank you Alexandre Simões, but now it shows 5 products per row and it looks congested.
It will be better if it shows 4 products per row.
Alexandre SimõesManager / Technology SpecialistCommented:
Sorry, I deleted the answer because it was wrong.

The problem is that some items are slightly bigger, making the float break.
If you inspect the element, the 2nd product is bigger than the first.

So the problem is actually with the height of the images.
Make them all the same height and you'll solve your problem.
Rajesh JoshiAuthor Commented:
Thank you again, but the pictures are from database. My client will be uploading the pictures of the product. is there any other solution?
Alexandre SimõesManager / Technology SpecialistCommented:
Sorry, I didn't explain myself well.
You have to make the image element the same size.

Try this, in the style.css file, line 620 replace:
.images_1_of_4 img {
  max-width: 95%;

Open in new window

.images_1_of_4 a img {
  height: 280px;

Open in new window

Notice that the selector also changed, wasn't only the property.

Also be aware of the physical size of these images.
If they are simply uploaded by the user, make sure that they are not huge in terms of physical size (kb / mb).

Ideally what you would want to do is to have these images pre-processed and sized server-side just for the list display.
Otherwise if you have a lot of images, and big ones, the loading time will be too long.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rajesh JoshiAuthor Commented:
Dear Alexandre Simões,

You are great !!

I have changed to max-height: 280, as the site is responsive.

Thanks a lot,

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.