Jump to content

How to reduce space between sections on my blog page

Recommended Posts

8 hours ago, Eventide said:

Site URL: https://www.relativelygenealogy.com/blog

I have too much vertical space between the text section and the blog section.Β  I'd appreciate some help with this and I'd like the spacing to look similar to the contact page.

Β 

thanks!

Hi, add this code to custom css (Design > Custom CSS) and let me know how it goes πŸ™‚

.tweak-blog-basic-grid-width-inset .blog-basic-grid {
  margin-top:-60px;
}

Please give this a πŸ‘Β if it helps. Make sure to quote me or tag me in your reply, otherwise I won't be notified.

Link to comment

Hi Jia-

Thanks so much. My skills in CSS are limited so I don't think I ever would have gotten the first part. Everything looks great on desktop but not great on mobile. Depending on what device I am looking at it might be too close to close to the blog posts below or too high. Any suggestions?

Link to comment
14 hours ago, Eventide said:

Hi Jia-

Thanks so much. My skills in CSS are limited so I don't think I ever would have gotten the first part. Everything looks great on desktop but not great on mobile. Depending on what device I am looking at it might be too close to close to the blog posts below or too high. Any suggestions?

We can use media queries so the margin will only apply on desktop. You can try replacing the previous code with this and let me know what you think πŸ™‚

.tweak-blog-basic-grid-width-inset .blog-basic-grid {
  @media screen and (min-width:768px) {
    margin-top:-60px;
  }
}

Please give this a πŸ‘Β if it helps. Make sure to quote me or tag me in your reply, otherwise I won't be notified.

Link to comment

It helps. The placement is consistent but still too far away on mobile view. Any suggestions?


The contact page title is similarly distant on mobile view also. So I may need to apply the same to that page.

Edited by Eventide
Link to comment
12 hours ago, Eventide said:

It helps. The placement is consistent but still too far away on mobile view. Any suggestions?


The contact page title is similarly distant on mobile view also. So I may need to apply the same to that page.

Add this code, it's for the margin on mobile view.

/** FOR MOBILE **/
.tweak-blog-basic-grid-width-inset .blog-basic-grid {
  @media screen and (max-width:767px) {
    margin-top:-35px !important;
  }
}

The mobile view should look like this:

866130395_ScreenShot2022-03-13at15_16_28PM.thumb.png.d63476584ad3b525520031b8b8f2d731.png

The contact page's mobile view looks great on my end, but here's the code for if you'd like to adjust it (just edit the value (5px) to what you prefer.

@media screen and (max-width:767px) {
  .sqs-block.form-block.sqs-block-form {
    margin-top: -5px;
  }
}

Let me know how it goes πŸ™‚

Please give this a πŸ‘Β if it helps. Make sure to quote me or tag me in your reply, otherwise I won't be notified.

Link to comment
  • 1 month later...

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.