Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2005
    Posts
    246
    Plugin Contributions
    0

    Default trouble centering main product image

    I checked admin-configuration, and looked everywhere I could think of. I tore these two files apart and put them back together every way I could think of:
    tpl_modules_main_product_image.php
    tpl_product_info_display.php

    still, my main product image is left aligned when I want it to be centered.

    Can anyone tell me how to center this image?

    (This is a 1.3.6 cart.)

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: trouble centering main product image

    This is not a PHP issue. The image position can be controlled in your stylesheet with

    #productMainImage {}

  3. #3
    Join Date
    Feb 2005
    Posts
    246
    Plugin Contributions
    0

    Default Re: trouble centering main product image

    Quote Originally Posted by gjh42 View Post
    ... in your stylesheet with

    #productMainImage {}
    I forgot to come back and say thanks so, belatedly: Thanks!

    Your reply helped.

  4. #4
    Join Date
    Jul 2008
    Location
    london
    Posts
    169
    Plugin Contributions
    0

    Default Re: trouble centering main product image

    for info.

    many thanks

    soul39

  5. #5
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default Re: trouble centering main product image

    I can find #productMainImage, #reviewsInfoDefaultProductImage etx but how do you use this to centre the product info image?

    Cheers.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: trouble centering main product image

    Something like
    Code:
    #productMainImage {
        margin: auto; 
        float: none;
        }
    The float: none; is only necessary if the element has a float set elsewhere. If the float is set in the stylesheet, just remove that float instead of adding another declaration.
    You can also use text-align: center; if the #productMainImage div has a fixed width and you want variable width images to center inside that space.

 

 

Similar Threads

  1. v154 CSS: Centering Main Image Above Additional Images
    By Feznizzle in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 26 Mar 2016, 03:03 PM
  2. Help centering main product image!!
    By kcb410 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 8 Sep 2012, 11:09 PM
  3. Centering an Image on Main Page
    By reversegarbage in forum Basic Configuration
    Replies: 3
    Last Post: 21 Jul 2008, 05:42 AM
  4. centering product category icons in main page
    By ex.wear in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 4 Apr 2008, 08:26 AM
  5. Additional Images + Main Image Trouble
    By Cyopz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Feb 2008, 11:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg