Jump to content

In sections, padding is greater on bottom than on top on desktop (fine in mobile). Any ideas how to fix?

Recommended Posts

Headlines in sections look vertically centered when working in editor, but when it's saved, there is clearly more padding below headline than above. It's completely fine in mobile, though.

It seems Squarespace has set some kind of "desktop" only extra padding at the bottom of new sections and I think it's like 17 pixels extra. Any idea how to eliminate that and make the vertical padding equal across the board on desktop and mobile?

I've tried this and it made it better on desktop, but now mobile is wrong (big time) (so I removed it)

#page section .content-wrapper {
    padding-top: 22px !important;
    padding-bottom: 5px !important;
}

The image below shows how it's perfectly aligned when editing but how it's completely off when saved (desktop, at default settings). Thanks.

 

Screen Shot 2021-08-02 at 7.40.05 AM.jpg

 

 

Edited by azodl
extranous images
Link to comment
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

A friend sent this to me. I'm not sure if it's correct, but this is what he is saying:

<div class="col sqs-col-12 span-12">

<div class="sqs-block html-block sqs-block-html" data-block-type="2" id="block-c8eccf28d37835dfc8db">
<div class="sqs-block-content">
<h2 style="text-align: center; white-space: pre-wrap; transition-timing-function: ease; transition-duration: 0.9s; transition-delay: 0.403125s;" class="preFade fadeIn"><a href="/financials"><strong>Financial Projections</strong></a></h2>
</div>
</div>

</div>

 
sqs-block is the b**ch that adds the 17px padding to the H2 element - as if it is anticipating content below it - the content below it - like a paragraph doesn't have the padding so it doesn't look misaligned when you have an H2 and then a proceeding P

So what I see is: 
 
Bad vertical alignment in your example:
HEADING 2
(17 pixel space causing the element to push the container's floor down)
 
Good vertical alignment in your example:
HEADING 2
(17 pixel space pushing the paragraph down not the container floor)
PARAGRAPH
(no extra padding)
 
That extra padding (which is different from a margin - a margin doesn't add space around it, just affects the space between itself and other elements) is causing the bottom of the container to push down - making it look vertically misaligned.
Link to comment
12 hours ago, tuanphan said:

Hi. Can you share link to page in screenshot? We can help easier

No I cannot, but you can easily see the issue if you simply add a text section to a site. Even in the preview screen you can see the previews are also off (more padding on bottom than on top). I'm including a screenshot with markers:

Screen Shot 2021-08-04 at 12.36.52 PM.jpg

Link to comment
55 minutes ago, IgnitePerth said:

Without a site link we can't really provide you with a solution. You can privately share your dev site with a password (it only allows us to view it).

The problem is likely a margin or padding from the surrounding blocks/sections.

I just stated that it's in the SS's own code by showing you a screenshot of when you go to add a section, it clearly is showing extra padding on the bottom (and I also provided actual html). Just open a 7.1 site and look for yourself. I believe my template is Carmine. I shouldn't have to share a private site link.

Link to comment
On 8/4/2021 at 9:32 PM, azodl said:

I just stated that it's in the SS's own code by showing you a screenshot of when you go to add a section, it clearly is showing extra padding on the bottom (and I also provided actual html). Just open a 7.1 site and look for yourself. I believe my template is Carmine. I shouldn't have to share a private site link.

It's amazing the expert repliers here won't simply look at ANY site template when adding a new section to see that these sections all have additional padding on the bottom that squarespace has purposely set up for some reason (but not on mobile, only desktop).

Why would I have to give you a link to a page that is actually private? I mean private as in no one is allowed to see it, not private as in I can just give you a password to access it so you can see it. Just add a new section to a SS site and look at your own code to see what I'm talking about and to figure out if there is some kind of CSS to fix it/change it to be vertically padded exactly the same on top and bottom in desktop.

Edited by azodl
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.