joshuar87 Posted April 25, 2016 Share Posted April 25, 2016 (edited) Hi, One of the most frustrating things about aligning blocks on your website is that there seems to be a minimum size for your horizontal (Drag up and down) spacers. Why would that be and is there a way to make the blocks as small as necessary? Thanks Edited April 25, 2016 by joshuar87 Initial Revision Scoobie, mtamaccio, paul2009 and 1 other 4 Link to comment
Solution brandon Posted April 25, 2016 Solution Share Posted April 25, 2016 (edited) Update 10/24/2019: Add this via the CSS Editor, save and refresh: /* Add this first bit to get more flexibility in height. */ .sqs-layout.sqs-editing .sqs-block, .sqs-block-spacer-content { min-height: 0px !important; } .sqs-block-spacer .sqs-block-content { height: 0; } /* Add this second bit too if you want to be able to go to zero. */ .sqs-block-spacer { padding-top: 0 !important; padding-bottom: 0 !important; } If a response helped you out, show some love by 'Like' (bottom-right) and/or 'Upvote' (top-left). Note that the minimum width of a spacer block isn't dictated by the block, but by Squarespace's grid system. It's not an issue with the spacer block, but it's the minimum width of any block on Squarespace (technically, it's the minimum width of columns). Messing with grid column width requires a case-by-case evaluation and code-writing. Original Answer: Hi @joshuar87. I've run into this in the past as well. The minimum height of the spacer block can seem too high for some instances. The minimum height seems to be based on a combination of your templates default 'line-height' property, the default top/bottom gutter height (17px), and an arbitrary minimum padding set by the SS system. Finally, a min-height rule limits the spacer block when dragging it up and down in LayoutEngine. It is possible to override these values by inserting the following CSS into the CSS Editor. Save, then refresh the page. /*Remove minimum spacer-block height*/ .spacer-block { padding-top: 0; padding-bottom: 0 !important; } .spacer-block .sqs-block-content { line-height: 0.0em; } .sqs-layout.sqs-editing .spacer-block { min-height: 0; } /*End remove spacer-block height*/ Keep in mind that if Squarespace changes their code, this kind of CSS can stop working at any time. Let me know how this works for you. -Brandon Edited October 24, 2019 by brandon Initial Revision coen, shan24, ThePromoTeam and 2 others 4 1 If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' (top-left) Link to comment
joshuar87 Posted April 27, 2016 Author Share Posted April 27, 2016 Hi Brandon, awesome answer, thank you worked straight away! Link to comment
joshuar87 Posted April 27, 2016 Author Share Posted April 27, 2016 Hi Brandon, awesome answer, thank you worked straight away! Link to comment
brandon Posted April 27, 2016 Share Posted April 27, 2016 (edited) @joshuar87 Great. If you wouldn't mind marking my answer as accepted, that'd be appreciated. Edited April 27, 2016 by brandon Initial Revision If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' (top-left) Link to comment
michaeljpitts Posted May 25, 2016 Share Posted May 25, 2016 YES! Thank you!!! @BrandonW Link to comment
michaeljpitts Posted May 25, 2016 Share Posted May 25, 2016 YES! Thank you!!! @BrandonW Link to comment
slow Posted July 22, 2016 Share Posted July 22, 2016 Works brilliantly thanks! To others who try this, once you have inserted the code, don't expect your site to respond by automatically reducing the Spacer Blocks to 0 - you have to go and click on each one and then you'll see the grey circle, and can drag the Spacer to as small as you like. Thanks @BrandonW ThePromoTeam 1 Link to comment
slow Posted July 22, 2016 Share Posted July 22, 2016 Works brilliantly thanks! To others who try this, once you have inserted the code, don't expect your site to respond by automatically reducing the Spacer Blocks to 0 - you have to go and click on each one and then you'll see the grey circle, and can drag the Spacer to as small as you like. Thanks @BrandonW Link to comment
jackdibs Posted August 10, 2016 Share Posted August 10, 2016 Thanks @BrandonW Been looking for this for quite some time. Made my day! Link to comment
jackdibs Posted August 10, 2016 Share Posted August 10, 2016 Thanks @BrandonW Been looking for this for quite some time. Made my day! ThePromoTeam 1 Link to comment
brandon Posted August 10, 2016 Share Posted August 10, 2016 Nice! Thanks for posting. Side note: I converted your Answer to a Comment (it's easy to accidentally post an answer instead of a comment). Up-voting useful answers is also helpful. Best! jaisequoia 1 If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' (top-left) Link to comment
tylerrogers Posted October 27, 2016 Share Posted October 27, 2016 Thank you so much! This code is a life-saver. Link to comment
Guest Posted January 26, 2017 Share Posted January 26, 2017 Tried the code and it's not working for me :( Any idea if squarespace has updated something and that is why, or am I possibly entering it wrong? Thanks! Link to comment
boulos Posted December 27, 2017 Share Posted December 27, 2017 Hi Brandon, Do you have a version of this that can reduce the minimum width of a spacer? I have one placed at the side and I'd like to shrink it! Thanks v much!Paul ilseS 1 Link to comment
juliadoyle123 Posted January 8, 2018 Share Posted January 8, 2018 Hey @BrandonW Thanks so much for the code! Is there any chance you could suggest how to override the minimum width of a spacer? All my attempts to modify your original code seem to fail! Thanks again! Link to comment
Celia1570048426 Posted February 19, 2018 Share Posted February 19, 2018 @BrandonW , they seem to have changed the code. Do you have an update? Thanks! Link to comment
Jdesigns Posted April 19, 2018 Share Posted April 19, 2018 @BrandonW, Celia, It still worked for me April 2018 in Brine (Moksha). Maybe because I put it at the top of my CSS list along with my other overall site styles? Link to comment
jeffreyzie Posted August 21, 2018 Share Posted August 21, 2018 @BrandonW Hey Brandon, any update on a new code? This one isn't working anymore. Thank you!-Jeff Creator of ivorycolors.net & stoplitteringtoday.org Link to comment
brandon Posted October 24, 2019 Share Posted October 24, 2019 Hi all. I've updated the answer. I've left the previous answer as well in case that works better for others. In general, you can inspect the code and form your own custom CSS by using your browser's developer tools/inspector. However, hopefully the code above is all you'll need. Burinsky 1 If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' (top-left) Link to comment
caroline.leonard Posted March 22, 2021 Share Posted March 22, 2021 8 minutes ago, caroline.leonard said: Hi, This works for the vertical spacer but not when you try to move horizontally? Any ideas? Link to comment
tuanphan Posted March 24, 2021 Share Posted March 24, 2021 On 3/22/2021 at 5:03 PM, caroline.leonard said: Hi. Have you solved it yet? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
DolceCotti Posted July 16, 2021 Share Posted July 16, 2021 Hello, is there any way to resize the blocks smoothly, currently it seems to be doing it in increments so there's no way to actually get the real size I want. Link to comment
creedon Posted July 17, 2021 Share Posted July 17, 2021 @DolceCotti SS uses a 12 column layout. When laying things out blocks will snap to the grid. It may be possible to get where you want with some Custom CSS. We'd need more detail and be able to see what you are talking about. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
shan24 Posted August 5, 2021 Share Posted August 5, 2021 Thanks Brandon! One of the easiest and quickest answers to a problem I've ever come across! Worked like a charm! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment