user994585
user994585

Reputation: 671

How can I center this submit button?

I'm working on this page and trying to center the Add to Cart (submit) button within it's parent div. I've tried various methods but can't get it to move at all.

I've tried form.cart { margin:auto; text-align:center; } and .single_add_to_cart_button { margin:auto; text-align:center; }, neither of which do anything.

Thanks in advance for any advice.

Upvotes: 0

Views: 165

Answers (4)

rasah_dipikir_jerojero
rasah_dipikir_jerojero

Reputation: 175

try make text align center on parent (form)

form.cart {
    text-align: center;
}

Upvotes: 1

Nima Derakhshanjan
Nima Derakhshanjan

Reputation: 1404

as jmore009 said remove float:left; and then add margin:0 auto 0 auto !important; to class of single_add_to_cart_button

Upvotes: 0

Stef
Stef

Reputation: 341

.single_add_to_cart_button { float:none; }

Upvotes: 0

jmore009
jmore009

Reputation: 12923

Just remove float: left from the button with a class of single_add_to_cart_button

Upvotes: 2

Related Questions