Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jun 2007
    Posts
    21
    Plugin Contributions
    0

    Default additional images spacing

    Hi,

    I need to reduce the size of the space created around each of the additional images I've added to a product page. I want four additional images across (this has been set in the admin). The images are only 100 x 100. They should fit and in FF they do. The problem is IE. The fourth images is getting pushed down to the next row.

    The columns appear to be too wide. When I pulled up the HTML there was this line of code:

    <div class="additionalImages centeredContent back" style="width: 25%;">

    If I change that 25% to 20% it does the trick. Now, how do I change that so it really changes? Is this even how I should go about this???? Where are the html files and should I be editing them?

    This is really driving me crazy. I've tried changing all kinds of css but nothing works.

    Any help would be greatly appreciated.

    The URL for the page with the additional images is:

    http://69.89.31.83/~egallant/ZenCart...products_id=23

    Again, it's IE that has the display problem.

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

    Default Re: additional images spacing

    A search in the Developers Toolkit for class="additionalImages shows this:

    /includes/modules/additional_images.php

    Line #102 : $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '&#37;;"',

    and a search on $col_width shows:

    /includes/modules/additional_images.php

    Line #75 : $col_width = floor(100/$num_images);

    Line #77 : $col_width = floor(100/IMAGES_AUTO_ADDED);


    Change line 75 to

    $col_width = floor(100/$num_images) - 1;

    and that will give the browsers room for rounding errors. (You can also say
    $col_width = floor(98/$num_images);
    or however else you want to tweak it.)

    You may also need to change line 77 the same way; look at the context to find out.
    Last edited by gjh42; 7 Jul 2007 at 06:58 PM.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,004
    Plugin Contributions
    25

    Default Re: additional images spacing

    P.S. - Save the edited file in
    /includes/modules/your_template/additional_images.php
    to protect your changes during upgrades.

  4. #4
    Join Date
    Jun 2007
    Posts
    21
    Plugin Contributions
    0

    Default Re: additional images spacing

    Thank you! That did the trick. I did have to put "-1" after both of those lines of code. Once done the images popped back up onto one line. Thank you very much. That was going to make me nuts!

  5. #5
    Join Date
    Aug 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: additional images spacing

    /includes/modules/additional_images.php

    Line #102 : $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',

    and a search on $col_width shows:

    /includes/modules/additional_images.php

    Line #75 : $col_width = floor(100/$num_images);

    Line #77 : $col_width = floor(100/IMAGES_AUTO_ADDED);


    Change line 75 to

    $col_width = floor(100/$num_images) - 1;

    and that will give the browsers room for rounding errors. (You can also say
    $col_width = floor(98/$num_images);
    or however else you want to tweak it.)

    You may also need to change line 77 the same way; look at the context to find out.
    I am also experiencing this problem in I. I tried several permuations of the above advice, with no success. All any of the changes did was completely remove my additional images.

    Any other ideas for this IE issue? It works just fine in Netscape/Mozilla.

    My test site is located at http://www.handspunyarn.org/

    Thanks & Happy Holidays.

    -the redhead-

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

    Default Re: additional images spacing

    This is a curious case... the change in the math to alter width could not by itself make additional images not function. Either something about the way you did it was wrong (but only for IE), or perhaps it interacts with your template in strange ways. Have you tried switching to /classic/? And then make that change to lines 75 & 77 in a copy of additional_images.php in /includes/modules/classic/additional_images.php, and see if it works there.

    Your template has a bunch of javascripts active in the product info page; maybe they interact with this file in a way that causes some problem.

    As an aside, this template is showing at the foot of all the pages the javascript "- Click Image to Close" link, which you really want only on popups. You might ask the template maker about that.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,004
    Plugin Contributions
    25

    Default Re: additional images spacing

    Have you tried setting additional images to 3 per row? That results in 33% width each, which allows room for rounding errors. It couldn't hurt to verify that that is what is going on.

  8. #8
    Join Date
    Aug 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: additional images spacing

    Have you tried setting additional images to 3 per row? That results in 33% width each, which allows room for rounding errors. It couldn't hurt to verify that that is what is going on.
    Yup - I checked that first. It's set to 3 per row

    Yes, the code is not the basic stuff. Problem is that I know just enough to be dangerous ;) I may have to hire a coder for an hour to figure that one out. But I do try to do things myself. I'll poke at it some more to see if I can figure it out first.

    Thanks again for the suggestions & Happy Holidays.

    -the redhead-
    ...not a geek in Real Life, I just play one at werk...

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,004
    Plugin Contributions
    25

    Default Re: additional images spacing

    Re the "3 per row" - it occurs to me that if there are only two items in the list, they will be calculated for that and not for three, so you can't test the rounding error effect that way.

    Did you try the /classic/ edit suggested? This will verify if the problem is in your template code. Do it in two steps - first look at it in straight classic, and then make the edits and look again.

  10. #10
    Join Date
    Jan 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: additional images spacing

    Is there a way to change the additional images so that they are not spaced based on the column width %, but rather just aligned left with a 5 px padding?

    Thanks for any help.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Additional img spacing
    By picandnix in forum General Questions
    Replies: 2
    Last Post: 8 Feb 2012, 03:40 PM
  2. Additional images spacing
    By logicalstep in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 3 Dec 2011, 01:02 AM
  3. Spacing between additional images
    By jenchord in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Jun 2011, 11:16 PM
  4. Additional Images - Spacing Between
    By spectreman in forum General Questions
    Replies: 3
    Last Post: 2 Aug 2007, 03:28 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR