BrookeP Posted August 7, 2019 Posted August 7, 2019 (edited) Is there a way to remove padding inside of a code block? I've inserted an image using a Code block and want the block to fit snug around the image itself, but I'm getting an extra padding on all sides. Here is a link to the site for referencePassword: weddings This is the code I currently tried to use: .sqs-block-code .sqs-block-content { padding-top: 0px; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; } Any help would be much appreciated! Edited August 7, 2019 by bpurnell Initial Revision
tuanphan Posted September 2, 2019 Posted September 2, 2019 @bpurnell Have you resolved yet? If not, please share site url to check. 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!)
Mum-Folk Posted April 12, 2020 Posted April 12, 2020 I'm having a similar problem - code block adds way too much padding below the content. Is there a CSS workaround? I tried the above and no luck kakers 1
tuanphan Posted April 13, 2020 Posted April 13, 2020 7 hours ago, Mum-Folk said: I'm having a similar problem - code block adds way too much padding below the content. Is there a CSS workaround? I tried the above and no luck Try this CSS, it it doesn't work, please share link to your site to check .code-block { padding: 0 !important; } GDesign, ericka and ElleR 3 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!)
Nankas Posted September 15, 2020 Posted September 15, 2020 Does anyone have the answer to this?? Please
tuanphan Posted September 18, 2020 Posted September 18, 2020 On 9/15/2020 at 3:48 PM, Nankas said: Does anyone have the answer to this?? Please I sent above code. If it doesn't work, can you share link to page where you use Code Block? 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!)
ericka Posted January 15, 2021 Posted January 15, 2021 @tuanphanThank you for this your solution! The code below that you shared worked for me. I appreciate your constant willingness to help out fellow Squarespace users! .code-block { padding: 0 !important; } GDesign and tuanphan 2
AmalieCharlesworth Posted February 11, 2021 Posted February 11, 2021 Hi does anyone know how to do this exact feature without removing the border completely? I just want to reduce the size of the border by half! thank you!! Amalie
tuanphan Posted February 14, 2021 Posted February 14, 2021 On 2/11/2021 at 9:28 PM, AmalieCharlesworth said: Hi does anyone know how to do this exact feature without removing the border completely? I just want to reduce the size of the border by half! thank you!! Amalie Can you share link to page where you have problem? We can help 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!)
kakers Posted January 20, 2022 Posted January 20, 2022 On 4/12/2020 at 9:17 AM, Mum-Folk said: I'm having a similar problem - code block adds way too much padding below the content. Is there a CSS workaround? I tried the above and no luck Did anyone solve this? The code didn't work for me. Special Modern Design
tuanphan Posted January 21, 2022 Posted January 21, 2022 On 1/20/2022 at 9:27 AM, kakers said: Did anyone solve this? The code didn't work for me. Can you share link to page where you have problem? We can help 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!)
HunterD Posted March 25, 2022 Posted March 25, 2022 Did anyone get the solution for this problem? Remove padding inside code block, none of the codes above worked. Thanks!
tuanphan Posted March 26, 2022 Posted March 26, 2022 15 hours ago, HunterD said: Did anyone get the solution for this problem? Remove padding inside code block, none of the codes above worked. Thanks! Can you share link to page where you use Code Block? We can help 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!)
MillyBanks Posted March 30, 2022 Posted March 30, 2022 https://sunflower-eagle-a3h3.squarespace.com/home Having a similar issue with a custom code block. Lots of padding under the video!! In fact I can't seem to target the video specifically to edit anything (like I was able to with the text. I want to be able to bring the video in front of the text 'box' so it looks like the final screenshot and remove the white space under the video.
tuanphan Posted April 1, 2022 Posted April 1, 2022 On 3/30/2022 at 10:03 AM, MillyBanks said: https://sunflower-eagle-a3h3.squarespace.com/home Having a similar issue with a custom code block. Lots of padding under the video!! In fact I can't seem to target the video specifically to edit anything (like I was able to with the text. I want to be able to bring the video in front of the text 'box' so it looks like the final screenshot and remove the white space under the video. Which page are you referring to? I don't see above text/video on the page https://sunflower-eagle-a3h3.squarespace.com/home 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!)
MillyBanks Posted April 3, 2022 Posted April 3, 2022 (edited) Hi @tuanphan I had deleted the block as it wasn't working but it have popped the code back in if you want to take a look! https://sunflower-eagle-a3h3.squarespace.com/home I would also like the video to appear in front of the text block but can't seem to make z-index work Edited April 3, 2022 by MillyBanks
tuanphan Posted April 4, 2022 Posted April 4, 2022 10 hours ago, MillyBanks said: Hi @tuanphan I had deleted the block as it wasn't working but it have popped the code back in if you want to take a look! https://sunflower-eagle-a3h3.squarespace.com/home I would also like the video to appear in front of the text block but can't seem to make z-index work Add this CSS div#block-yui_3_17_2_1_1648605913394_9538 video { z-index: 99; position: relative; } 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!)
Iwan Posted April 7, 2022 Posted April 7, 2022 Hi @tuanphan, is there a CSS to reduce the padding around one specific text block? Please?
tuanphan Posted April 10, 2022 Posted April 10, 2022 On 4/7/2022 at 4:23 PM, Iwan said: Hi @tuanphan, is there a CSS to reduce the padding around one specific text block? Please? Use this #text-block-id { padding: 0px !important; } Use this tool to find block id https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff?hl=en 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!)
karenrosenfeld Posted May 10, 2022 Posted May 10, 2022 On 4/12/2020 at 8:17 PM, tuanphan said: Try this CSS, it it doesn't work, please share link to your site to check .code-block { padding: 0 !important; } Hi @tuanphan I am having trouble with this too. I've tried everything. There is so much padding around my text in my code block. Do you have a fix? The "featured blogs" text https://karenrosenfeld.com/karenrosenfeldcreative-1
tuanphan Posted May 13, 2022 Posted May 13, 2022 On 5/10/2022 at 7:32 AM, karenrosenfeld said: Hi @tuanphan I am having trouble with this too. I've tried everything. There is so much padding around my text in my code block. Do you have a fix? The "featured blogs" text https://karenrosenfeld.com/karenrosenfeldcreative-1 Which page are you referring to? I don't see Featured Blogs on above page 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!)
LaurenG Posted November 7, 2022 Posted November 7, 2022 I found the solution in this post! I tried and it worked perfectly for me! tuanphan and karenrosenfeld 2
Kmaestro Posted November 30, 2023 Posted November 30, 2023 I have issues with this, please. Hi. I've been trying to fix this on my site 1. Fixing spacing/padding on my embedded opt-in form on the home page 2. Finding why some blogs are no longer showing on the website I thought it would be a fairly simple CSS fix but it seems not to be that way. I'd like to roughly halve or remove the padding so that it matches the normal padding used throughout the page. The padding seems to be associated with the page section rather than the form itself. Here's my website link: https://www.balancedbbs.com/ Looking forward to your help. Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment