Jump to content

How to stop the background image for the first section from sitting behind the header

Recommended Posts

Always struggled with this too, but I think I found the solution.  Following the suggestion from @tuanphan above, I added a blank section above it, told it minimum height , and reduced the the minimum number of blocks to 1.  That got it pretty small but still added to the height of my header.

So I found the ID of the section (There's a nifty browser plugin I found somewhere that lets you easily identify section IDs,

Then in the custom CSS area I gave it a height: 0  code.

So:

section[data-section-id="FIND ID NUMBER"] {
  height: 0;
}

So far seems to work like a charm.

Link to comment
  • 5 months later...
8 hours ago, addisonpann said:

I tried this to no avail. Site URL: https://addisonpann.com/greenslate

image.thumb.png.b1247e3ee31b8f7cb35756f7c28b6eb2.png

Any idea why?

You need to unset default height with min-height

section[data-section-id="656a24b505e3c8250155f597"] {
    height: 0 !important;
    min-height: unset !important;
    padding-top: 0 !important;
}

By default, first section has a default padding, so padding-top will remove this

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.