Link to home
Start Free TrialLog in
Avatar of badwolfff
badwolfffFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do I distribute divs evenly in my search results in a masonry type of layout?

You can see the product listing on my site here:
http://demo.missionfamily.org/index.php?route=common/homeproduct
There is a red button called "VISUALIZZA I RISULTATI" please click it to see all products on the site.
You will notice that some rows have empty spaces. That is due to the fact that neighbouring items are too tall and they are causing other items to go to next row.

Could someone suggest a working solution? I don't mind even if the soluton is css based as long as it works.

I tried both brick-by-brick and masonry without much success :(
Brick-by-brick causes conflicts on page with other working elements.
Masonry doesn't work and causes some conflicts too.

thanks
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

You are using the Monarch Wordpress theme, correct?

It has a "Block Grid" feature. According to the documentation:
Block Grid
Block grids are made from a ul.small-block-grid-# or ul.large-block-grid-#. These are ideal for blocked-in content generated by an application, as they do not require rows or even numbers of elements to display correctly.

These have a bit of flexibility since you have access to two separate grids between our built in 768px breakpoint. If you use the small-block-grid only, the grid will keep its spacing and configuration no matter the screen size. If you use large-block-grid only, the list items will stack on top of eachother for small devices. If you use both of those classes combined, you can control the configuration and layout separately for each breakpoint.
Demonstrated near the bottom of this demo.
http://themeforest.net/item/monarch-responsive-multilanguage-theme/full_screen_preview/7556268
Avatar of badwolfff

ASKER

No I am not using monarch wordpress theme. The site is not in wordpress. What reference you might have found to monarch is a plugin that I am trying to integrate to show social sidebar, nothing more. :(
For the time being I have set the div height to 500px but that is only a temp solution :(
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial