Jump to content

Four responsive equal height/width columns with aligned buttons.

Recommended Posts

This code gives me three vertically/horizontally responsive columns with equal height and width with buttons aligned. Regardless of difference in length of copy. However, it does not work when attempting to have four columns across. Any ideas of how I can make it work for four columns?

Thanks in advance.

 

[your-data-section-id] .sqs-row {
  display: flex;
  flex-wrap: wrap;
}
[your-data-section-id] .sqs-col-4 {
  background-color: #ebebeb;
  box-sizing: border-box;
  display: flex;
  flex: 1 1 330px;
  flex-direction: column;
  margin: 1%;
  padding: 30px;
}
[your-data-section-id] .button-block {
  margin-top: auto;
}
Link to comment
22 hours ago, 19blue said:

Thank you again @tuanphan
 

I tried the .sqs-col-3 but it moves the 4th column down.

352461284_ScreenShot2021-04-29at6_40_20PM.thumb.png.a622f47557f76a54afb59e45d44b3f2e.png
 

Add this code under

@media screen and (min-width:768px) {
[your-data-section-id] .sqs-row {
 flex-wrap: nowrap !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 5 months later...

Hi @tuanphan - I've followed the code you provided here and it's 99% worked for me. So thank you for that. But for some reason on laptop only (it's fine on tablets) I get this happening (see attached - the button block below 'Junior' has 'detached' itself from the rest of the card).

And also on the row below, the same thing is happening.

It seems to be related to how many lines of text I put into the block. Is there a way of fixing it so it all stay aligned regardless how much text I use?

website: https://www.eshertennis.co.uk/tennismembershipnew (pw: james)

Screenshot 2021-10-09 at 10.30.55.png

Edited by jbassett
Added more detail
Link to comment
On 10/9/2021 at 4:33 PM, jbassett said:

Hi @tuanphan - I've followed the code you provided here and it's 99% worked for me. So thank you for that. But for some reason on laptop only (it's fine on tablets) I get this happening (see attached - the button block below 'Junior' has 'detached' itself from the rest of the card).

And also on the row below, the same thing is happening.

It seems to be related to how many lines of text I put into the block. Is there a way of fixing it so it all stay aligned regardless how much text I use?

website: https://www.eshertennis.co.uk/tennismembershipnew (pw: james)

Screenshot 2021-10-09 at 10.30.55.png

Hi,

It looks fine to me?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.