Forums / Templates, Stylesheets, Page Layout / Center the main product image

Center the main product image

Locked

Views: 2,841

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
4 Jun 2006, 4:41 PM
#1
guitarslinger avatar

guitarslinger

New Zenner

Join Date:
May 2006
Posts:
23
Plugin Contributions:
0

Center the main product image

Hell everyone - this has had me pulling my hair out all day!

I'm using the latest version of Zen and have been making some decent progress getting my site re-designed from a static html site over to a new all singing/dancing database driven site.

Anyhow - i am trying to center the main product image in the product detail page.
Here's the link: http://richtonemusic.co.uk/store/index.php?main_page=product_info&products_id=1

As you can see it is currently aligned to the left....and i can't get it to budge...Gggrrrr

I've tried altering the stylesheet, and entering info straight into tpl_product_info_display.php

Can someone please give me a work around on this so I can spend the rest of the evening with my girlfriend!!??

Thanks in anticipation.
:wacko:

4 Jun 2006, 7:02 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Center the main product image

You appear to have messed with something you shouldn't have as the left box and all following are stuck inline with the header instead of below it. Try to undo whatever it was you did there.

For the main image, this

<div id="productMainImage" class="centeredContent back" align="right">

controls and the "back" is trying to force the image to the left. Remove it (in tpl_modules_main_product_image.php) and the centeredContent should be able to work. Did you add the align="right"? It doesn't seem to be doing anything useful.

Let me know how this works.

4 Jun 2006, 7:18 PM
#3
guitarslinger avatar

guitarslinger

New Zenner

Join Date:
May 2006
Posts:
23
Plugin Contributions:
0

Re: Center the main product image

I've been tinkering all day on it - the header thing is a new one on me though...

I'm using IE - which browser are you viewing it in?
I guess i need to download Firefox etc to check that everything is ok.

I will have a look at the code you gave and get back to you.

Cheers

Richard

4 Jun 2006, 7:35 PM
#4
guitarslinger avatar

guitarslinger

New Zenner

Join Date:
May 2006
Posts:
23
Plugin Contributions:
0

Re: Center the main product image

Yep - it looks goosed in Firefox....grrrr

4 Jun 2006, 8:14 PM
#5
guitarslinger avatar

guitarslinger

New Zenner

Join Date:
May 2006
Posts:
23
Plugin Contributions:
0

Re: Center the main product image

Great - anyone know how i can align my main store to the center?

I've managed to get my logo centered. But the navigation bar above is left aligned.

The main contents of my store is now left aligned.

And i still haven't figured on how to get the picture on my product info pages to sit in the middle of the screen!!

I'm having a good day on this aren't i?! :shocking: :yuck: :cry:

5 Jun 2006, 8:06 PM
#6
guitarslinger avatar

guitarslinger

New Zenner

Join Date:
May 2006
Posts:
23
Plugin Contributions:
0

Re: Center the main product image

Hi There

I replaced the line of code you highlighted with just this

<div id="productMainImage">

And if you click my link to the produce page you should see a nicely aligned image on my product page!!!

BOSH!!!

Thanks.:thumbsup: