Jump to content

How can I add a photo above my site header in 7.1?

Recommended Posts

Add to Home > Design > Custom CSS

header#header:before {
    background-image: url(https://cdn.pixabay.com/photo/2020/12/03/16/58/sunset-5801050__340.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    display: block;
    content: "";
    width: 100%;
    height: 300px;
}

 

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
  • 11 months later...
  • 1 year later...

This code works. (NOTE: only on homepage!). 

/* Add a banner */

body.homepage div#siteWrapper:before {

    content: "";

    background-image: url(Place here);

    background-size: cover;

    background-repeat: no-repeat;

    background-position: center; 

    display: block;

    width: 100%;

    height: 900px;

}

/* Add sticky header */

header#header {

    position: sticky !important;

    top: 0px;

}

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.