Results 1 to 8 of 8

Hybrid View

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

    Default Line up products

    How can i line up products ?

    So that every product and price are horizontally align the images and prices.

    http://zwembaden-zwembad-materialen....dex&cPath=9_10

    Name:  Naamloos.jpg
Views: 161
Size:  52.6 KB
    Last edited by jurg1505; 19 Jul 2015 at 10:21 PM.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Line up products

    Standardize your image heights

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Line up products

    Quote Originally Posted by kobra View Post
    Standardize your image heights
    That's what I thought at first, but they are standardised. The problem is caused by the varying lengths of the title text. :-)

    Cheers
    RodG

  4. #4
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Line up products

    There are other potential "pushers" of the formatting as well, but if not used then won't be a problem: longer title text, attributes, specials, etc...

    I usually use like min-height to allow expansion. I would rather the content be present than worry about the look if for some reason the reduced size makes content disappear.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Line up products

    Quote Originally Posted by mc12345678 View Post
    I usually use like min-height to allow expansion
    min-height isn't a viable solution to what the OP is trying to achieve here (perfect/stable alignment), unless s/he knows in advance the minimum height needed to cater for all of the 'potential pushers'.

    Furthermore, a look at the code/site indicates that in this case the only variable involved is the product_title, and this (by default) is limited to 64 characters, IOW, the minimum amount of space needed to cater for the 'push' *can* be determined, BUT, if/when the title reaches this maximum of 64 characters, the min-height needed to keep everything aligned (based on the currently defined font size) is 40px, which means most titles (those that don't come close to the 64 character limit) will have at least 10px more whitespace than is needed to keep everything else aligned.

    The fixed height of 30px that I provided allows everything to be perfectly aligned without this additional space and without making anything disappear when the maximum allowed is reached.

    Yes, I *did* experiment with both the height and the min-height settings before providing my prefered solution for this specific problem/situation/scenario. :-)

    Cheers
    RodG

  6. #6
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Line up products

    Quote Originally Posted by RodG View Post
    min-height isn't a viable solution to what the OP is trying to achieve here (perfect/stable alignment), unless s/he knows in advance the minimum height needed to cater for all of the 'potential pushers'.

    Furthermore, a look at the code/site indicates that in this case the only variable involved is the product_title, and this (by default) is limited to 64 characters, IOW, the minimum amount of space needed to cater for the 'push' *can* be determined, BUT, if/when the title reaches this maximum of 64 characters, the min-height needed to keep everything aligned (based on the currently defined font size) is 40px, which means most titles (those that don't come close to the 64 character limit) will have at least 10px more whitespace than is needed to keep everything else aligned.

    The fixed height of 30px that I provided allows everything to be perfectly aligned without this additional space and without making anything disappear when the maximum allowed is reached.

    Yes, I *did* experiment with both the height and the min-height settings before providing my prefered solution for this specific problem/situation/scenario. :-)

    Cheers
    RodG
    I *do* believe (pretty much expect) that the size suggestion came from "testing" and that the comment wasn't directed to me but to show the depth of care you normally take to provide a viable solution. The min-height of 30px would still serve the same purpose/effect generally speaking and yes could result in a "push" of one or more products if the full character (default) length were used. Guess I go for more of the ahh, so on occasion the perfect lineup may get affected, but at all times the customer sees all of the information "pertinent" to the product perspective. If that is not considered satisfactory to the store owner then explain the reasons (much like done above) and if look is the only factor of the owners desire, then so be it, fix the size to what has been requested, with explanation as to why I disagree with it... It's a bit of a shame that more can't easily be done on the "front" end to simply make things line up like that more consistently/adjust on a row basis easier, but there still remans so many factors involved... Ie. On a responsive template with a mobile device, often each product is on it's own row, therefore the "alignment" doesn't really factor in, but providing ever more css to accomodate just makes more information to load... So needs the balance... I guess further the use of min-height does take some "processing" to figure it out so that too can be a draw on loading... Maybe I've just been schooled. will consider the discussion in future applications. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Line up products

    I can't guarantee that there won't be unexpected side effects

    From line#192 of "includes/templates/responsive_sheffield_blue/css/stylesheet.css"


    Code:
    .product_title {
      font-size: 110%;
      font-weight: bold;
      width: 90%;
      height: 30px;
    }
    Add the line highlighted with blue text.

    Cheers
    RodG

 

 

Similar Threads

  1. Line between products
    By cawill24 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Sep 2009, 04:48 AM
  2. Show only two products per line in New Products
    By anksrox in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Apr 2009, 12:30 PM
  3. products dividing line
    By darktowerhobbies in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 15 Feb 2008, 02:34 PM
  4. Products Don't line up
    By smoke133 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 6 Oct 2007, 05:01 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