Skip Navigation

[Resolved] Equalize view column heights

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 4 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1985845
row heights.png

I have a page with a view that displays posts in 3 columns. The height of the feature image of each post can have a different aspect ratio so the height of the cards for each post is different.

hidden link

How can I make it so all cards on the same row have the same height?

#1986101

Hello, there are several options here and the best solution depends on your personal preferences. One option is to use CSS to create a minimum height for each cell. Choose a minimum height that is taller than the normal height of the shortest element, like so:

.list-view-loop.publicaciones-view-loop {
    min-height: 300px;
}

You can adjust the 300px setting as desired. This will be an effective way to equalize the heights of the cells, and might be a simple way to solve the problem. However, it may not be effective at all screen sizes and resolutions. The minimum height may be too tall in some cases, leaving a large amount of white space around each cell. Since the aspect ratio is variable, the results may appear inconsistent. A series of media queries in CSS may be necessary to tweak this display at different screen sizes.

Another option is to set the featured image block to use a consistent image size, like the built-in "thumbnail" size, which is cropped to 150x150 (screenshot attached). That could help equalize the image heights, but not necessarily the cell heights. If a cell has a large amount of text content, you may still have problems with unequal cell heights. The solution here may require a combination of both approaches.