Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Nov 2006
    Posts
    88
    Plugin Contributions
    0

    Default Making subcategory images all the same size?

    Is it possible to get all the images displaying within subcategories all one size? I don't mean the actual image but say some sort of wrapper around it, as at the moment depending on the height of the image the text below isn't equal to the category next to it etc...

    Thanks

  2. #2
    Join Date
    Oct 2007
    Posts
    64
    Plugin Contributions
    0

    Default Re: Making subcategory images all the same size?

    Quote Originally Posted by RobM View Post
    Is it possible to get all the images displaying within subcategories all one size? I don't mean the actual image but say some sort of wrapper around it, as at the moment depending on the height of the image the text below isn't equal to the category next to it etc...

    Thanks
    can you please elaborate or show sample ?

  3. #3
    Join Date
    Nov 2006
    Posts
    88
    Plugin Contributions
    0

    Default Re: Making subcategory images all the same size?

    Yeah, this is what I mean:



    If you look at the bottom left product you can see the text is raised higher slightly, this is because the image height is slightly smaller than the others.

    I'd like to add a div around the images or something, so I can give that a fixed height without effecting the actual size of the images, and the text will all line up.

    Hope that's a bit clearer.

  4. #4
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Making subcategory images all the same size?

    I wonder what would happen if you styled the text to bottom-align and the images to top-align? The top edge of all the images should be the same level and the bottom of all the text lines should be the same level. No extra div required.

    Rob

  5. #5
    Join Date
    Nov 2006
    Posts
    88
    Plugin Contributions
    0

    Default Re: Making subcategory images all the same size?

    Doesn't seem to make any difference!

    Code:
    .categoryListBoxContents img {vertical-align: top;}
    .categoryListBoxContents a {vertical-align: bottom;}

  6. #6
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Making subcategory images all the same size?

    Ah well, worth a try.

    Link to the site always helps us diagnose problems.

    Rob

  7. #7
    Join Date
    Nov 2006
    Posts
    88
    Plugin Contributions
    0

    Default Re: Making subcategory images all the same size?


  8. #8
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Making subcategory images all the same size?

    Vertical alignment in CSS is a pain. Some suggested methods work on text, but not in IE7, some work with images, but require a separate extra div around things if there's more than just the image (as in this case), and so on.

    My sole sugegestion, if this is important enough, is to convert that display to a table-based layout and use the easy table-based vertical alignment methods, which you can do via CSS.

    There's no sin in using a table for this, because you are definitely displaying tabular data.

    Rob

  9. #9
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Making subcategory images all the same size?

    @RobM

    What you can do in this case is: you can wrap the image in a div, then specify the fixed height for that div. You will have to change the height in css everytime you change the listing image size in admin, but I suspect you wont do that often anyway.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  10. #10
    Join Date
    Nov 2006
    Posts
    88
    Plugin Contributions
    0

    Default Re: Making subcategory images all the same size?

    Yes Yellow, that's what I was suggesting.

    I think the file I need to edit is includes/modules/custom/category_row.php

    Code:
        //    $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);
    
        $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
                                               'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>');
    
        $col ++;
        if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
          $col = 0;
          $row ++;
        }
        $categories->MoveNext();
      }
    }
    ?>
    Could you tell me how i'd put my div in there?

    Thanks.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Making images the same size without messing them up
    By SilverHD in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 23 Mar 2016, 10:03 PM
  2. Getting subcategory images/boxes the same size
    By stevanicus in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 22 Nov 2010, 11:25 PM
  3. Image Handler all the same size images needed?
    By chrismaddox3d in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 20 Sep 2010, 06:10 AM
  4. forcing images to all be the same size
    By nevada in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Feb 2010, 11:21 AM
  5. Making images all the same size on the home page
    By Trish in forum General Questions
    Replies: 4
    Last Post: 30 Sep 2008, 07:03 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