How to change ONLY the 'add to cart' button?

  • Posts: 14
  • Thank you received: 0
12 years 1 week ago #75157

I would like to make the "add to cart" button a little bigger
than the rest of the buttons and maybe a different color too.

I think I see where I can change the look of all of them together
in the CSS, but I want to target this specific one and make it
bigger and more noticeable from the ones next to it.

How can I do that?

Thanks.

Last edit: 12 years 1 week ago by tumbleweed.

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

  • Posts: 2334
  • Thank you received: 403
12 years 1 week ago #75208

Hi there,

You're right, you'll have to add some css in System>Configuration>Display in the front end css file to do so.
Simply add the css property to the button's class. It should look like this:

.hikashop_cart_input_button{
/*your css*/
}

Remember that you can use your browser or some extension like firebug to spot the class and id you want to custom with css ;)

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

  • Posts: 14
  • Thank you received: 0
12 years 6 days ago #75501

I believe that you might have specified the wrong class name.
Are you sure you didn't mean 'hikashop_cart_button'?

For instance I can place CSS in here to change the button.

a.hikashop_cart_button {
/* MY CSS */
}

BUT, my problem is that the changes are applied to more
than just the 'Add to cart' button. That way modifies other
buttons like 'Add to wishlist' as well.

I am trying to target ONLY the 'Add to cart' button.

What PHP file contains the actual code that is inserting this
'Add to cart' button into the page content?

Thanks.

Last edit: 12 years 6 days ago by tumbleweed.

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 6 days ago #75535

In order to target only add to cart buttons, you should do like that:

.hikashop_product_stock a.hikashop_cart_button {
/* MY CSS */
}

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

Time to create page: 0.071 seconds
Powered by Kunena Forum