Format a specific hikashop module

  • Posts: 51
  • Thank you received: 2
8 years 3 weeks ago #270258

-- url of the page with the problem -- : www.okosjokolade.no
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.7.1

I've made a hikashop module to show popular products from the store on selected pages on the site. The problem is that the "Add to cart"-button is to wide to work in the "right" position of the page (see picture). I can solve this by either:
1) have a different (shorter) text that applies only for this module or
2) edit the font size/weight for the button text for only this module
I would prefer the first solution, but both would work. Can any of these be fixed by adding som magic code to my custom hikashop CSS-file?

Attachments:

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

  • Posts: 83986
  • Thank you received: 13603
  • MODERATOR
8 years 3 weeks ago #270259

Hi,

I actually don't see the problem :
monosnap.com/file/kD3KDtsVZwmYykII8OPEmsR8mskuWi

But anyways.

The text of the add to cart buttons can be changed, but it is common to all the cart buttons and there is no easy way to change it for some listings and not others. That would require some custom coding.

So a CSS solution would be easier if you're not a developer.
First, I would recommend forcing the background to be transparent instead of white with such CSS:
#hikashop_category_information_module_249 div.hikashop_subcontainer {
background-color: transparent !important;
}
Then you can add such CSS to not fix the width of the button but have it dynamic based on the space available and remove the left/right margins arround the text:
#hikashop_category_information_module_249 .hikashop_cart_input_button{
width: 100% !important;
padding-left: 0 !important;
padding-right: 0 !important;
}

That should make the buttons fit without having to change the font size. And if you want to reduce the font size, you can also do it with more CSS:
#hikashop_category_information_module_249 .hikashop_cart_input_button{
font-size: 10px !important;
}

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

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

  • Posts: 51
  • Thank you received: 2
8 years 3 weeks ago #270310

Brilliant, works like a charm! Thanks for excellent support :-D

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

Time to create page: 0.046 seconds
Powered by Kunena Forum