Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Reduce height of code block


Claire_auck

Question

13 answers to this question

Recommended Posts

  • 0

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.

About: Sqsp Circle Leader since 2017. I value honesty, transparency, appreciation and great design ‚ô•.
Work: Squarespace Expert and founder of 
SF Digital, a company dedicated to improving websites by building the features¬†Squarespace didn't include‚ĄĘ. See our range of extensions to improve your online store.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Link to comment
  • 0

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;
}

866639557_Screenshot2021-07-28at22_31_09.thumb.png.c2f3c61daa0d170d45701a144bc59344.png

If you want to reduce both height and width, you can add a Spacer Block beside the Code Block instead of using CSS.

Paul

About: Sqsp Circle Leader since 2017. I value honesty, transparency, appreciation and great design ‚ô•.
Work: Squarespace Expert and founder of 
SF Digital, a company dedicated to improving websites by building the features¬†Squarespace didn't include‚ĄĘ. See our range of extensions to improve your online store.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Link to comment
  • 0

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
 

Screen Shot 2021-07-29 at 9.56.13 AM.png

Link to comment
  • 0
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.

Link to comment
  • 0
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

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
  • 0
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

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
  • 0
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

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

Create an account or sign in to comment

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

√ó
√ó
  • Create New...