Claire_auck Posted July 28, 2021 Posted July 28, 2021 Site URL: https://seamtech.squarespace.com/ Hi everyone. I am hoping that there's a solution for reducing the extra space that a code block creates. I have uploaded an SVG but as you can see in the screenshot, it creates a big container. Is there a way to target this so I can have the boat animation closer to text? https://seamtech.squarespace.com/ pa33word Many thanksClaire 🙂
paul2009 Posted July 28, 2021 Posted July 28, 2021 Hi Claire Is it the height of the image that you want to change? The dimensions are being set by the SVG file and because images will appear at 100% width on the Squarespace page, the SVG will retain the aspect ratio making the height around 210px. You can make this appear less by placing the SVG higher up the page by adding some negative margin in Custom CSS: #block-yui_3_17_2_1_1627505219076_5381 .sqs-block-code img { margin-top: -100px; } If you want to reduce both height and width, you can add a Spacer Block beside the Code Block instead of using CSS. Paul Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Claire_auck Posted July 28, 2021 Author Posted July 28, 2021 Hi Paul, so nice to hear from you and thanks for answering my question. The width/height of the svg image is good. It's the gap between the last line of yellow text and the animation that's the issue. It seems to add a large container which I think it normal for SS? Or could the svg be saved in a different way? It sounds like your code solutions will work well. Just a dumb question here, do i need to update the 'img' with the svg file name or is the #block id enough? I tried the code as it is but it doesn't change anything but It looks like you've managed it in your screenshot. Cheers Claire
Solution paul2009 Posted July 29, 2021 Solution Posted July 29, 2021 Sorry Claire. I added a space between the block ID and the rest. It shouldn't be there. That's the problem with posting at 11pm at night. It should have been: #block-yui_3_17_2_1_1627505219076_5381.sqs-block-code img { margin-top: -100px; } In answer to your questions, I used the Block ID of your Code Block on the specific page. If someone wants to use this solution, they'll need to use the ID that refers to their Code Block, as each one is unique. If you were embedded the SVG code in the code block, you'd use the reference 'svg', but as you've uploaded your SVG as a .svg file, it's correct to use the 'img' reference. tuanphan and Claire_auck 1 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Claire_auck Posted August 3, 2021 Author Posted August 3, 2021 On 7/29/2021 at 9:39 PM, paul2009 said: Sorry Claire. I added a space between the block ID and the rest. It shouldn't be there. That's the problem with posting at 11pm at night. It should have been: #block-yui_3_17_2_1_1627505219076_5381.sqs-block-code img { margin-top: -100px; } In answer to your questions, I used the Block ID of your Code Block on the specific page. If someone wants to use this solution, they'll need to use the ID that refers to their Code Block, as each one is unique. If you were embedded the SVG code in the code block, you'd use the reference 'svg', but as you've uploaded your SVG as a .svg file, it's correct to use the 'img' reference. Sorry for the slow reply Paul, I'm just back onto this project now. This worked perfectly, thank you so much for you help as always! Yes working after 11pm has it's disadvantages. tuanphan 1
IwanJ Posted November 26, 2021 Posted November 26, 2021 Hi @paul2009 Hope you're keeping well? I'm having a similar issue but the code doesn't seem to work, I'm trying it for a section (gallery). Could you please possibly assist?
tuanphan Posted November 28, 2021 Posted November 28, 2021 @IwanJ Can you share link to page where you have problem? 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!)
IwanJ Posted November 29, 2021 Posted November 29, 2021 Hi @tuanphan, sure, thank you, https://deep-learning-cafe.squarespace.com/ if you look at the Trusted By Teams At section, I'd like to increase the padding a little bit between the title and the top of the section, but reduce the spacing between the logos and the title just a bit so that everything is evenly spaced...
tuanphan Posted November 30, 2021 Posted November 30, 2021 On 11/29/2021 at 1:20 PM, IwanJ said: Hi @tuanphan, sure, thank you, https://deep-learning-cafe.squarespace.com/ if you look at the Trusted By Teams At section, I'd like to increase the padding a little bit between the title and the top of the section, but reduce the spacing between the logos and the title just a bit so that everything is evenly spaced... The site is private. You should setup password & share url again/ We can check easier. 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!)
IwanJ Posted November 30, 2021 Posted November 30, 2021 Must I post the password here, or can I DM you the password?
tuanphan Posted December 1, 2021 Posted December 1, 2021 20 hours ago, IwanJ said: Must I post the password here, or can I DM you the password? You can post here or send a message 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!)
IwanJ Posted December 2, 2021 Posted December 2, 2021 Hi @tuanphan, sure, thank you, https://deep-learning-cafe.squarespace.com/ if you look at the Trusted By Teams At section, I'd like to increase the padding a little bit between the title and the top of the section, but reduce the spacing between the logos and the title just a bit so that everything is evenly spaced... Can you please help? I have sent the password via direct message
tuanphan Posted December 2, 2021 Posted December 2, 2021 1 minute ago, IwanJ said: Hi @tuanphan, sure, thank you, https://deep-learning-cafe.squarespace.com/ if you look at the Trusted By Teams At section, I'd like to increase the padding a little bit between the title and the top of the section, but reduce the spacing between the logos and the title just a bit so that everything is evenly spaced... Can you please help? I have sent the password via direct message Why you don't add Gallery Block to add logos. Then you can add Text Block above it, instead of using 2 Sections to add text/images Add to Design > custom CSS /* Trusted by Team */ [data-section-id="61a0791fdfd0aa6784b37b75"] .gallery-grid.gallery-grid--layout-grid { padding-top: 0px; } div#block-abbc045be3aca25ed45b { padding-top: 37px; } 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!)
IwanJ Posted December 3, 2021 Posted December 3, 2021 Thanks, I tried Gallery but I can't add Text Block above in the same section. If I keep it as it is, how do I reduce padding in the bottom section where the logos are?
KipB Posted January 7, 2023 Posted January 7, 2023 (edited) I'm also wanting to reduce the size (height primarily) of the code block. Here's a link to one of the pages I am working on. https://www.nashconsulting.com/workshops If someone can help me with the code and if I can add it Custom CSS so it works throughout the site? (I was able to do that with the spacer block height, I think). Thanks for your help! Edited January 8, 2023 by KipB
tuanphan Posted January 8, 2023 Posted January 8, 2023 23 hours ago, KipB said: I'm also wanting to reduce the size (height primarily) of the code block. Here's a link to one of the pages I am working on. https://www.nashconsulting.com/workshops If someone can help me with the code and if I can add it Custom CSS so it works throughout the site? (I was able to do that with the spacer block height, I think). Thanks for your help! Try adding to Design > Custom CSS div.code-block { padding: 0px !important; height: 1px !important; } KipB 1 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!)
KipB Posted February 24, 2023 Posted February 24, 2023 Thank you @taunphan! Sorry it took me so long to get back into this and see your reply. The code you provided worked perfectly! Curious - could I change the height to 0px? Not that I really want to - but just wondered if that would be possible.
tuanphan Posted February 27, 2023 Posted February 27, 2023 On 2/24/2023 at 11:43 PM, KipB said: Thank you @taunphan! Sorry it took me so long to get back into this and see your reply. The code you provided worked perfectly! Curious - could I change the height to 0px? Not that I really want to - but just wondered if that would be possible. Yes. Just change 1px to 0px KipB 1 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!)
scs18 Posted December 3, 2023 Posted December 3, 2023 Hi @tuanphan, I have been having the same issue across our website and have tried adding the custom css with no luck. Wondering if there is another solution? Website is https://www.theselfcaresisterhood.com/ and I'm specifically trying to change the spacing in the footer underneath our newsletter subscribe form Thank you!
tuanphan Posted December 5, 2023 Posted December 5, 2023 On 12/4/2023 at 10:52 AM, scs18 said: Hi @tuanphan, I have been having the same issue across our website and have tried adding the custom css with no luck. Wondering if there is another solution? Website is https://www.theselfcaresisterhood.com/ and I'm specifically trying to change the spacing in the footer underneath our newsletter subscribe form Thank you! Use this CSS code You can use this CSS code to Website Tools (under Not Linked) > Custom CSS /* Footer newsletter spacing */ .fe-641fc9caeeb8e8453ac7f320 { grid-template-rows: repeat(10,minmax(calc(~"var(--container-width) * var(--row-height-scaling-factor)"), auto)) !important; } melody495 1 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!)
melody495 Posted December 7, 2023 Posted December 7, 2023 On 12/5/2023 at 7:52 AM, tuanphan said: You can use this CSS code to Website Tools (under Not Linked) > Custom CSS /* Footer newsletter spacing */ .fe-641fc9caeeb8e8453ac7f320 { grid-template-rows: repeat(10,minmax(calc(~"var(--container-width) * var(--row-height-scaling-factor)"), auto)) !important; } Hi @tuanphan, this works! A question, do you know if it's possible to detect it programmatically and adjust the number? e.g. repeat(10,..) in the above example, I can see what what number would fit best, but if there a way of calculating which number would fit the content? I have this issue on quite a few pages, trying to see if I manually do it in Custom CSS or if there is another way. -------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification Melody | Squarespace Nerd 💻 💁♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn? 👩💻 💁♀️ Website help <- send me your to-do list. From code to plugin to domain setup. 🧰 See the tools I use (contain affiliate links) ☕ Did I help? I like coffee (Thank you)
tuanphan Posted December 7, 2023 Posted December 7, 2023 17 hours ago, melody495 said: Hi @tuanphan, this works! A question, do you know if it's possible to detect it programmatically and adjust the number? e.g. repeat(10,..) in the above example, I can see what what number would fit best, but if there a way of calculating which number would fit the content? I have this issue on quite a few pages, trying to see if I manually do it in Custom CSS or if there is another way. I don't know how to calculate it automatically with the code, I have to manually try each number until I find the number that seems best. 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment