Skip Navigation

[Resolved] Bootstrap grid spacing

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

Problem: I am using Views to create a Bootstrap grid. There is a large gap in the second row of columns.

Solution:
Add the "row" class to the Loop template div, like this:

<div class="row">
<div class="col-sm-3">
...the rest of the loop content...
</div> <!-- close the column -->
</div> <!-- close the row -->

Relevant Documentation:
https://toolset.com/documentation/user-guides/digging-into-view-outputs/

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
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 4 replies, has 3 voices.

Last updated by horngO 6 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1113238
Capture.JPG

Hello, I am trying to display a responsive 4 columns, 4 rows bootstrap grid in Layout. Everything is intuitive. However, when I see check the output, the "cells" are misaligned. Please see attached image. It seems it's caused by each cell having non-equal height.

How would I go about in making each cell equal height while maintaining the responsiveness?

#1113548

The cells in the image are all aligned in 2 rows.
I am not sure what you refer to, can you share a Link to the issue, and describe how we could achieve the issue?

#1113627

If you go to

hidden link

Notice that row 2 has a big white gap.

#1113893

Hi, try adding the "row" class to each row of content in your Loop.
[php]
<div class="row">
<div class="col-sm-3">
...the rest of the loop content...
</div>
</div>

I added the "row" class in the browser console and it seems to be displayed better. If you need more assistance, I'll need to see the code in your Loop Editor and the code in any Content Template assigned to this View.

#1114496

Very nice. Quick and simple fix. Thank you.