Jump to content

How can I get multiple columns on checkboxes?

Recommended Posts

Posted

Site URL: https://www.berbergroup.co.uk/

Right now it looks like they're adjacent but unaligned in editor mode, and then in preview mode they're not even aligned. I'm currently using the code: 

''

.form-field-checkbox-layout-stack .sqs-block-form {
  display: flex;
  flex-wrap: wrap; /* Ensures that checkboxes wrap to the next line when necessary */
  justify-content: space-between; /* Distributes the checkboxes evenly */
}

.form-field-checkbox-layout-stack .sqs-block-form .form-item.checkbox {
  display: flex;
  align-items: center; /* Aligns the checkbox and label in the middle vertically */
  flex-direction: row; /* Makes sure the checkbox and label are in a row */
  min-width: 200px; /* Sets the minimum width for each checkbox item */
  margin-bottom: 20px; /* Adds spacing between rows */
}
''

However, it's not working, can someone help? 

Screenshot 2024-10-14 102148.png

Screenshot 2024-10-14 101632.png

  • Replies 4
  • Views 405
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)
17 hours ago, AdamKarkar said:

Site URL: https://www.berbergroup.co.uk/

Right now it looks like they're adjacent but unaligned in editor mode, and then in preview mode they're not even aligned. I'm currently using the code: 

''

.form-field-checkbox-layout-stack .sqs-block-form {
  display: flex;
  flex-wrap: wrap; /* Ensures that checkboxes wrap to the next line when necessary */
  justify-content: space-between; /* Distributes the checkboxes evenly */
}

.form-field-checkbox-layout-stack .sqs-block-form .form-item.checkbox {
  display: flex;
  align-items: center; /* Aligns the checkbox and label in the middle vertically */
  flex-direction: row; /* Makes sure the checkbox and label are in a row */
  min-width: 200px; /* Sets the minimum width for each checkbox item */
  margin-bottom: 20px; /* Adds spacing between rows */
}
''

However, it's not working, can someone help? 

Screenshot 2024-10-14 102148.png

Screenshot 2024-10-14 101632.png

I can't see the form. Can you send me the page link where there is the form?

Edited by Web_Solutions

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Posted

I think the code you're using is working as expected. 

It sets a min width but not a max width and it tells items to wrap if there's not enough space on a row. 

Manchester, Lancaster and St Helens probably take up too much width for a 200px min width item to fit alongside them and so wrapping occurs. 

Give us a link to the actual page and I or someone else will be able to help. 

I'm Colin Irwin aka silvabokis.  I've been a Squarespace designer & developer since 2013. 
You might want to check out my
Squarespace Template Finder or read my Squarespace tips
Speaking of tips, 💲I've got a tip jar. Feel free to throw a few quid into if you think I've helped you. 

If you're looking for a Squarespace developer Book a chat or Drop me a line - first meeting is always free  

 

Posted
7 hours ago, AdamKarkar said:

Thanks for your help. 

No probs. The page still looks weird to me - white text on a white background.

I'm Colin Irwin aka silvabokis.  I've been a Squarespace designer & developer since 2013. 
You might want to check out my
Squarespace Template Finder or read my Squarespace tips
Speaking of tips, 💲I've got a tip jar. Feel free to throw a few quid into if you think I've helped you. 

If you're looking for a Squarespace developer Book a chat or Drop me a line - first meeting is always free  

 

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.