Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Centralise the add to cart button

Centralise the add to cart button

Locked

Views: 756

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
24 Jul 2010, 3:57 PM
#1
ggbarnum avatar

ggbarnum

New Zenner

Join Date:
Jul 2010
Posts:
37
Plugin Contributions:
0

Centralise the add to cart button

Hi all,

Being new to zencart, (as in just 1 week new), I have found these forums extremely helpful in coming to terms with how it all works, I have found answers to pretty much everything so far, but I can't find an answer to this question.

I am trying to centralise the price, add to cart value and the add to cart button. I am guessing it has to be done via CSS somehow (float: middle or something maybe) but I have absolutely no previous knowledge of any of this so am teaching myself as I go along, so any help would be appreciated. I had a look around my CSS files but I don't really know what I am looking for.

Here is a link to a product page on my site (ignore the scruffy layout, I am just playing right now)

http://cheekychile.com/index.php?main_page=product_info&cPath=5_8&products_id=1

If you need me to paste any code the just let me know what you need :)

Thnks in advance for any help you can give,
Jas.

24 Jul 2010, 4:06 PM
#2
fragageddon avatar

fragageddon

New Zenner

Join Date:
Jul 2010
Posts:
79
Plugin Contributions:
0

Re: Centralise the add to cart button

In your css file.
#cartAdd {
float:center;
}

24 Jul 2010, 4:11 PM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Centralise the add to cart button

float probably won't work, but text-align:center; should.

24 Jul 2010, 4:14 PM
#4
fragageddon avatar

fragageddon

New Zenner

Join Date:
Jul 2010
Posts:
79
Plugin Contributions:
0

Re: Centralise the add to cart button

stevesh:

float probably won't work, but text-align:center; should.

It is already set to float: right by default. The only problem is that if you are using a border, it stretches it across the product page.

24 Jul 2010, 4:15 PM
#5
ggbarnum avatar

ggbarnum

New Zenner

Join Date:
Jul 2010
Posts:
37
Plugin Contributions:
0

Re: Centralise the add to cart button

Thanks for the quick response, here is the entry in stylesheet_main.css is

#cartAdd {}
#cartAdd .cartAdd_indent{}
#cartAdd .cartAdd_indent span{ font-family:Arial, Helvetica, sans-serif; font-size:11px; text-transform:uppercase; color:#0088cc; font-weight:bold; text-decoration:underline}
#cartAdd .cartAdd_indent input.cart_quantity{width:56px; height:18px; background:#ffffff; color:#181c23; font-size:11px; margin-top:3px; border:solid 1px #e1e1e1}
.padd1{padding-top:5px;}

  • html #cartAdd .cartAdd_indent .padd1{padding-top:6px;}

where abouts would I add it ?

Thanks again.

24 Jul 2010, 4:49 PM
#6
ggbarnum avatar

ggbarnum

New Zenner

Join Date:
Jul 2010
Posts:
37
Plugin Contributions:
0

Re: Centralise the add to cart button

Hi,

Ok, thanks that worked great... (the text-align:center; bit)

Now how do I do the same with the price ?

Thanks again.

24 Jul 2010, 6:10 PM
#7
ggbarnum avatar

ggbarnum

New Zenner

Join Date:
Jul 2010
Posts:
37
Plugin Contributions:
0

Re: Centralise the add to cart button

I figured it out. I just added:

#productPrices {
text-align: center;
}

to my stylesheet.css

Thanks for the help above.