Skip Navigation

[Resolved] Split: How to have equal height columns in a Layouts row

This thread is resolved. Here is a description of the problem and solution.

Problem:
A Layout has a row with two columns. The columns have background colours and should be equal height, but typically one column is shorter than the other and the background colour does not extend to the bottom of the row.

Solution:
Simply applying display: flex to the parent row will by default make the child columns expand to the full height.

The Layouts grid is based on the Bootstrap 3 grid and doesn't use flexbox, so you just need to be careful to use a media query to add the style rule or it will break the collapsing of the grid on smaller screens.

So, you'll need to edit your Layout and add a class name to the row where you want the child columns to be of equal height, e.g. a class name of "equal-height".

Then add the following custom CSS:

@media ( min-width: 1200px ){
  .equal-height {
    display: flex;
  }
}

Your media query may need to be different depending on your Layout.

This support ticket is created 6 years, 2 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by chrisC-25 6 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1095730

Hi,

New issue in this layout. I want the column on the left to have the grey background no matter where the text ends. I want it to always extend to the footer no matter what happens on the right column. I did increase padding in a css style that worked but is not ideal as all copy will not be the same and I would also need to make media queries. How can I get that left side to be grey at all times?

hidden link

Thanks

#1095732

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Chris

The difficulty here is that the height of the parent row is not explicitly set—it expands to the height of the longest column—so you cannot add a height:100% to the child columns to make them expand to the size of the column.

Flexbox can come to the rescue. Simply applying display: flex to the parent row will by default make the child columns expand to the full height.

The Layouts grid is based on the Bootstrap 3 grid and doesn't use flexbox, so you just need to be careful to use a media query to add the style rule or it will break the collapsing of the grid on smaller screens.

So, you'll need to edit your Layout and add a class name to the row where you want the child columns to be of equal height, e.g. a class name of "equal-height".

Then add the following custom CSS:

@media ( min-width: 1200px ){
  .equal-height {
    display: flex;
  }
}

Try that, I think it should do it.

#1095973

That did it! Thanks Nigel!