Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Layout issues with WooCommerce products

Featured Replies

HI Guys,

 

After a bit of help here :)

 

I have solved a similar issue on the site before but just cannot work this one out.

 

The website is: http://madelovinglymade.com/

 

When you view the site on a mobile phone or shrink it to about 300px wide on a desktop the products at the bottom (Recent Products) some of there appear not inline.

 

I.e. you have 2 per row but some only display 1 product per row. When I had the similar issue before it was fixed by amending the line height. However I am just lost with this one and cannot solve it as of yet.

 

Thanks for the help.

 

 

I'm not sure what the solution is although I think I have come across the same thing before so I'll see if I can remember whether I solved it.

 

The problem is that some of your lines of description are longer than others and overflow onto 2 lines, which makes the box taller - you probably knew that :)

OK, I think what I did was give the captions a fixed height which is probably not a very elegant solution.

 

{display: block; height: 50px;}

Edited by Jane B

A possible jQuery solution will be to get the height of the tallest element in the row and assign the same height to the other elements, so they all have equal heights;

 

 

jQuery(document).ready( function($){
    
    $.fn.equalHeights = function() {
    var maxHeight = 0;
    return this.each(function(index, box) {
        var boxHeight = $(box).height();
        maxHeight = Math.max(maxHeight, boxHeight);
    }).height(maxHeight);
    };
    $('your-class-here').equalHeights();


});

 

Then on widow resize you need to make sure they keep the same height:

 

 

jQuery( window ).resize(function() {
    $('your-class-here').equalHeights();
    $('your-class-here').css('height', 'auto');
}); 

Hope that helps :)

  • Author

Thanks for the help.

 

I have gone for the quick and dirty solution so far of setting a fixed height of 260px. Will looking into ti further when I have more time.

 

Thanks

Again.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.