Jump to content

Code block on mobile cant be made smaller

Recommended Posts

When I create anchor links using a code block that only contains this code:

<div id="name"></div>

the code block on mobile is huge - 6 grid blocks tall. I can't make it shorter, and it messes up my mobile design. Anyone else running into this, or know of a workaround?

Link to comment
  • Replies 3
  • Views 559
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi,

We can use CSS code to achieve this. Can you share link to page where you use Code Block? We can check easier

Another approach, you can change current section to Classic Editor Section, the gap will disappear

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!)

Link to comment
  • 2 weeks later...

@tuanphan Can you share the CSS code to achieve this please? Seems a common issue and I can't find an answer anywhere. Here is my site - gaffe.uk . If you scroll down to "pack your bags" on mobile, the gap from the code block for the anchor link is too tall and I can't use the fluid engine to reduce it any lower than 6 grid blocks.

Thanks!

Link to comment
On 3/9/2023 at 1:22 AM, DanDan326 said:

@tuanphan Can you share the CSS code to achieve this please? Seems a common issue and I can't find an answer anywhere. Here is my site - gaffe.uk . If you scroll down to "pack your bags" on mobile, the gap from the code block for the anchor link is too tall and I can't use the fluid engine to reduce it any lower than 6 grid blocks.

Thanks!

I just found another approach, you try adding this to Design > Custom CSS then try reduce height on edit mode

html.squarespace-damask .sqs-blockStatus {
    display: none !important;
}

If it doesn't work, you mean this gap?

image.png.d424ab23ce5b1ff6d7302dd222fafcea.png

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!)

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...

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.