Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to center the "add to cart" button in product_info.php


OSC_FREAK

Recommended Posts

Posted

This is the little script:  <div class="buttonSet">
    <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
  </div>

 

but what should be added in order to center the button?

Posted

Hi there ,

if you use chrome and developer tools (or something similar)  you can have a look at what the css is doing.

buttonAction  has a float-right  applied to it.

So you could replace buttonAction with text-center (if you are using bootstrap)

 

Not sure if this is entirely correct but it centered the button for me using bootstrap.

 

Doug

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...