Forums / Templates, Stylesheets, Page Layout / Featured Products and alignment

Featured Products and alignment

Locked

Views: 1,004

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
2 Mar 2010, 8:44 AM
#1
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Featured Products and alignment

I would like to have each product in the featured products to be centered in their box. At the moment they are left aligned and it looks odd. I have looked everywhere to find where this is set but can not find the solution. I am using a purchased template that I have tailored to suit me. Can anyone help?
My site is: www.thehorsestall.com.au.

2 Mar 2010, 9:49 AM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Featured Products and alignment

Add the red part in your stylesheet:

.product_box {width:100%; margin-bottom:9px; background:#ffffff; text-align:center;}

Also. Zencart loads all stylesheets with the css extension in the current template's css folder, so it's always a good practice to remove 'old' stylesheets from that folder so you don't have conflicts.

2 Mar 2010, 9:52 AM
#3
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Featured Products and alignment

In your includes/templates/theme229/css/stylesheet_tm.css find this section of code:

.product_box {width:100%; margin-bottom:9px; background:#ffffff}<---missing semicolon after #ffffff;
```and add text-align: center; to make it look like this:

.product_box {width:100%; margin-bottom:9px; background:#ffffff; text-align: center;}




NOTE: Seems like every instance of the color #ffffff; in that particular stylesheet, you're missing the semicolon. You might want to fix those.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

2 Mar 2010, 8:28 PM
#4
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: Featured Products and alignment

Thankyou guys! That did the trick.
One more thing: The images are going to the right. Is that more about the image size (ie rectangle)? Or can I force them to centre as well?

3 Mar 2010, 1:44 AM
#5
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Featured Products and alignment

robbie269:

Thankyou guys! That did the trick.
One more thing: The images are going to the right. Is that more about the image size (ie rectangle)? Or can I force them to centre as well?

With the code you just added, everything including images look very nicely center-aligned to me. Maybe it's your browser's cache?

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

3 Mar 2010, 3:03 AM
#6
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: Featured Products and alignment

Hi again

Just realised it not only centered the Featured Products box it also centered ALL the product boxes. Changed it back to how it was as the other boxes looked odd with the text centered and the attibutes to the left etc. Is there a way of centering ONLY the Featured Products boxes as I have them displayed on my main page? Site: http://www.thehorsestall.com.au

3 Mar 2010, 3:53 AM
#7
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Featured Products and alignment

Hmmmm.........I see what you mean. O.k. Right above where you added and deleted the "text-align: center;", add this line of code:

#featuredProducts .product_box {text-align: center;}

I think that'll fix ya up.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

3 Mar 2010, 5:19 AM
#8
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: Featured Products and alignment

That did it. Thankyou very much!

3 Mar 2010, 5:21 AM
#9
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Featured Products and alignment

Anytime. Glad to see it's all working correctly.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!