Setting all product containers to equal heights?

  • Posts: 34
  • Thank you received: 1
11 years 2 months ago #117949

-- url of the page with the problem -- : audleymotors.smsidat.com/accessories/product/listing
-- HikaShop version -- : 2.2
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3
-- Browser(s) name and version -- : Chrome 28

Hi,

I'm trying to figure out how to ensure each container in the row is of equal height on the product listing page - so every container should automatically resize to the size of the largest container in the row. I've played around with display:table and display:table-row but having no luck. Is this something where jquery is required? Or is there a simpler solution in the hikashop settings?

I've linked to the page so you can see that certain containers are larger since there is more content in them, but I want the others to resize to the size of the largest one.

Any help appreciated, thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 2 months ago #117995

Hi,

I think that you can do it with some CSS customization like :

.hikashop_subcontainer.thumbnail {
height: 325px;
}

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #117996

Hi,

You can solve that in part with some css.
Add the following properties in the css file:

.hikashop_container .hikashop_product_name, .hikashop_container .hikashop_product_desc{
    min-height: 40px !important;
}

www.hikashop.com/support/documentation/1...ize-the-display.html

Please Log in or Create an account to join the conversation.

  • Posts: 34
  • Thank you received: 1
11 years 2 months ago #118287

Mohamed your solution does work, however I don't want them to be a fixed height, just the height of the tallest one.. I guess I'd need javascript for this, any thoughts?

Please Log in or Create an account to join the conversation.

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 2 months ago #118316

Hi,

Yes you can use a script in order to get the height of all elements (" .hikashop_container ") in the page, get the highest and so, change the height of all other elements.
If you have jQuery in your template it will be easier for scripting it because you can make a "each" on a HTML selector (so all ".hikashop_container"').

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.083 seconds
Powered by Kunena Forum