- Posts: 2
- Thank you received: 1
Contact us CSS on variants
4 years 9 months ago #337987
by Libes
Contact us CSS on variants was created by Libes
Hi,
i changed the css of the product page (show_default) and it looks fine but when i add variants to a product and i chose one of them the buttton "Contact us" shows the class "hikabtn" which i don't want to add. And i can't figure it out where to remove that class (i don't want to change the css of "hikabtn" becuse elsewhere i need it).
Thanks for your help
i changed the css of the product page (show_default) and it looks fine but when i add variants to a product and i chose one of them the buttton "Contact us" shows the class "hikabtn" which i don't want to add. And i can't figure it out where to remove that class (i don't want to change the css of "hikabtn" becuse elsewhere i need it).
Thanks for your help
Please Log in or Create an account to join the conversation.
4 years 9 months ago #337989
by nicolas
Replied by nicolas on topic Contact us CSS on variants
Hi,
You can do the same change in product / show.php where the HTML of the variants is generated.
However, I would still recommend to do this with CSS instead of view overrides.
If you do:
.hikabtn{ color: red; }
it will change the color of the elements with hikabtn everywhere, and you don't want that.
But what you can do instead is use the parent element class, like so:
.hikashop_product_contact_main .hikabtn{ color: red; }
That way, is will only change the color for the contact button and not the other buttons, even though they all use hikabtn.
You can do the same change in product / show.php where the HTML of the variants is generated.
However, I would still recommend to do this with CSS instead of view overrides.
If you do:
.hikabtn{ color: red; }
it will change the color of the elements with hikabtn everywhere, and you don't want that.
But what you can do instead is use the parent element class, like so:
.hikashop_product_contact_main .hikabtn{ color: red; }
That way, is will only change the color for the contact button and not the other buttons, even though they all use hikabtn.
The following user(s) said Thank You: Libes
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338000
by Libes
Replied by Libes on topic Contact us CSS on variants
Thanks,
it worked perfectly using css and parent element class!
it worked perfectly using css and parent element class!
The following user(s) said Thank You: Philip
Please Log in or Create an account to join the conversation.
Time to create page: 0.149 seconds