Page 1 of 1

Define Padding arround Product cards

Posted: Mon Sep 06, 2021 2:59 pm
by loop
Hi All
i'm wondering how i can have less padding thenn 15px between the products.
I know i could do:

Code: Select all

.contentText > .row > .col{
  padding-left: 7px;
  padding-right: 7px;
}
But thenn the title will not follow as there is also a padding defined there. Is there a simple / elegant solution to define that "global"?

Re: Define Padding arround Product cards

Posted: Mon Sep 06, 2021 3:53 pm
by Kofod95
I think .card for the cards should work - I seem to remember that's what I did. For the title at the top, I think you could target the main wrapper there as well, but I don't remember the name (sorry Mr. Shinoda)

//Daniel

//Daniel

Re: Define Padding arround Product cards

Posted: Tue Sep 07, 2021 4:00 pm
by edfaught
I believe that padding is set in the _grid_framework.scss file by the .col class. That might keep your quest interesting...

Re: Define Padding arround Product cards

Posted: Mon Sep 27, 2021 2:46 pm
by loop
if i would change the ".col" class setting, then the padding is changed everywhere, not only on the product view...

Re: Define Padding arround Product cards

Posted: Mon Sep 27, 2021 5:45 pm
by Omar_one
loop wrote: Mon Sep 27, 2021 2:46 pm if i would change the ".col" class setting, then the padding is changed everywhere, not only on the product view...
you can try this
override the product_listing.php file (copy it from templates/default/includes/components/ to templates/override/includes/components/)
then find on the copied file
this line

Code: Select all

 $prod_list_contents .= '<div class="col mb-2">';

change it to

Code: Select all

$prod_list_contents .= '<div class="col mb-2 px-2">';
then add this to user.css (templates/override/static/user.css)

Code: Select all

.px-2 {
  padding-left:7px !important;
  padding-right:7px !important;
}

Re: Define Padding arround Product cards

Posted: Mon Sep 27, 2021 8:16 pm
by loop
hi Omar_one

Thank you for your help! the Problem is, whenn i do that:
on the left (from column left to the first box of the product_listing) is thenn also only the 7px space and i like the 15px space there (as the everything, everywhere has always this space from categories box to the title for example)
so i need a solution to keep the space there and only reduce betwen the product's....

Re: Define Padding arround Product cards

Posted: Tue Sep 28, 2021 6:33 am
by loop
just figured it out, thank you!