Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    16
    Plugin Contributions
    0

    Default Product image layout in centrebox - this must be easy?

    Hello all. I'm struggling with trying to centre the two column layout of products I have in the centrebox, using ZC 1.3.9h and the classic template. As it stands they're left justified, I just want them in the middle!

    I'm thinking it must be this part of the stylesheet:
    Code:
    /*The main content classes*/
    #contentColumnMain, #navColumnOne, #navColumnTwo, .centerBoxContents, .specialsListBoxContents, 
    
    .categoryListBoxContents, .additionalImages, .centerBoxContentsSpecials, .centerBoxContentsAlsoPurch, 
    
    .centerBoxContentsFeatured, .centerBoxContentsNew, .alert {
    	vertical-align: top;
    	}
    /*.content,*/ #productDescription, .shippingEstimatorWrapper {
    	/*font-size: 1.2em;*/
    	padding: 0.5em;
    	}
    but having tried various stuff like "horizontal-align: center;" I'm not making progress

    Appreciate any help :)

    Alex

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Product image layout in centrebox - this must be easy?

    In a stock Zencart installation, they are centered (if I understand the question). (see www .stevesh.org) Can you provide a link to your site ?

  3. #3
    Join Date
    Aug 2011
    Posts
    16
    Plugin Contributions
    0

    Default Re: Product image layout in centrebox - this must be easy?

    I don't want it visible just yet, please excuse my not linking it.
    Cleansun dot co dot uk slash shop
    Thanks for your help :)

  4. #4
    Join Date
    Jan 2009
    Location
    The Netherlands/Germany
    Posts
    142
    Plugin Contributions
    12

    Default Re: Product image layout in centrebox - this must be easy?

    If you are talking about the images being left... try adding:

    Code:
    .centerBoxContentsNew img {
    margin-left: auto;
    margin-right: auto;
    }
    to your stylesheet
    I came, I saw, I got zenned... :)

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Product image layout in centrebox - this must be easy?

    Ah, the New Products listing.

    Add something like this to the bottom of your stylesheet:

    .centerBoxContentsNew img {margin: auto;}

    A couple of hints:

    Stop everything and create your custom template and move the files you've edited already into those folders. You'll lose everything at your next upgrade if you use the Classic template.

    Your product images are waaaay too big (file size, not dimensions, though they're a little big that way, too) and your site loads very slowly as a result. Rule of thumb is that the main (smallest version) of the product image be <10kb.

  6. #6
    Join Date
    Aug 2011
    Posts
    16
    Plugin Contributions
    0

    Default Re: Product image layout in centrebox - this must be easy?

    thank you both, will try shortly. Yes, aware that the images are too big, i'm intending to re size them all prior to launch.

  7. #7
    Join Date
    Aug 2011
    Posts
    16
    Plugin Contributions
    0

    Default Re: Product image layout in centrebox - this must be easy?

    Code:
    .centerBoxContentsNew img {margin: auto;}
    worked a charm, many thanks.

    I thought about the custom template thing briefly, and then thought I didn't want to upgrade anyway. I think you're right though, I should do it right. Going off in search of a guide to creating a custom template now.

    Thanks again for your help.

 

 

Similar Threads

  1. v151 is this easy? [1 product to show on regular product listing]
    By StoreOwner in forum General Questions
    Replies: 1
    Last Post: 5 Jan 2015, 02:25 AM
  2. Is this patch a must?
    By gixxer1000stunna in forum General Questions
    Replies: 8
    Last Post: 9 Sep 2009, 12:03 PM
  3. Must See - This would be great!
    By andrew55 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Jul 2009, 08:23 PM
  4. Easy question, someone must know
    By ebaobao in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 9 Aug 2008, 02:51 AM
  5. Turn off product links...I KNOW THIS MUST BE EASY! But everything I've tried failed!
    By debtag in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Feb 2008, 07:31 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