Jump to content

Add background image to header in 7.1

Go to solution Solved by ChrisBartow,

Recommended Posts

Site URL: https://mitzura.squarespace.com/

Hello,

Does anyone know of a way to add a background image to the header in 7.1? 

The workaround I've found is to make the header transparent, then add a section below the header which has the background image. But I don't want to have to go through every page of the website adding this extra section. 

I also tried adding background-image through custom CSS but it's not working:

#header {
background-image: url("sunman_tiny.gif") !important;
}

Any ideas much appreciated.

Thanks,
Erin 

Link to comment

You can also add this to Home > Design > Custom CSS

header#header {
    background-image: url(https://beaverhero.com/wp-content/uploads/2019/07/coffee-beans-1082116_640-min.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Thank you both. I combined your suggestions and my problem is solved!

Final code: 

.header-announcement-bar-wrapper {
   background-image: url("https://static1.squarespace.com/static/5e8f40af1b4e4b61d7da3560/t/5e98a44ff7394c3f871aec65/1587061839876/sunman_tiny.gif") !important;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

(realized I had my url format wrong also)

Many thanks!

Link to comment
  • 8 months later...
On 1/8/2021 at 1:41 AM, Abbodabby said:

Is it possible to add an image to a header on an individual page, not site-wide?

Add to Page Header

<style>
  .header-announcement-bar-wrapper {
   background-image: url("https://static1.squarespace.com/static/5e8f40af1b4e4b61d7da3560/t/5e98a44ff7394c3f871aec65/1587061839876/sunman_tiny.gif") !important;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 2 months later...

Hi, 

is there a way to put different image backgrounds on headers? 

I have an index that I would like my header to stay transparent, but for each project inside I would like to put a background on the header.

let me know if there is anyone that can help.

https://leonardocampaner.com/selected-work

pass: leonardo

 

thank you

 

 

Link to comment
On 4/10/2021 at 12:20 AM, vcampaner said:

Hi, 

is there a way to put different image backgrounds on headers? 

I have an index that I would like my header to stay transparent, but for each project inside I would like to put a background on the header.

let me know if there is anyone that can help.

https://leonardocampaner.com/selected-work

pass: leonardo

 

thank you

 

 

Hi. Each project will have a different or all projects same background?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Hi tuanphan I've managed to have some success with the code you posted: 

header#header {
    background-image: url(https://beaverhero.com/wp-content/uploads/2019/07/coffee-beans-1082116_640-min.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

However the background image does not cover the entire header area as I would like it to, such as in this example: 

Gart-BG-Header-Example-2.thumb.jpg.57070eafe10e8c120c04a66180014e66.jpg

Instead it only covers the main navigation area as you can see in this page I added the code to: 

https://matthew-kern-drzz.squarespace.com/paintings-new

Any suggestions? 

Cheers, 

M. 

Link to comment
23 hours ago, 2eLybZ6u said:

Hi tuanphan I've managed to have some success with the code you posted: 


header#header {
    background-image: url(https://beaverhero.com/wp-content/uploads/2019/07/coffee-beans-1082116_640-min.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

However the background image does not cover the entire header area as I would like it to, such as in this example: 

Gart-BG-Header-Example-2.thumb.jpg.57070eafe10e8c120c04a66180014e66.jpg

Instead it only covers the main navigation area as you can see in this page I added the code to: 

https://matthew-kern-drzz.squarespace.com/paintings-new

Any suggestions? 

Cheers, 

M. 

The url doesn't exist

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 3 weeks later...

Hi there I was wondering if after using this code to put in a background image in the header if you can edit it so that you can a use a different image for mobile device? My background image is just not looking great when it goes to mobile site. 

.header-announcement-bar-wrapper {background-image:url('IMAGE URL HERE'); background-repeat:repeat; background-size:1519px 584px;background-position: center;} .header {background-color:rgba(0,0,0,0)!important}

 

Thanks!

Link to comment
On 5/11/2021 at 3:40 PM, AnnaLDN said:

Hi there I was wondering if after using this code to put in a background image in the header if you can edit it so that you can a use a different image for mobile device? My background image is just not looking great when it goes to mobile site. 

.header-announcement-bar-wrapper {background-image:url('IMAGE URL HERE'); background-repeat:repeat; background-size:1519px 584px;background-position: center;} .header {background-color:rgba(0,0,0,0)!important}

 

Thanks!

Can you share site url? We can help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 1 year later...
On 10/19/2022 at 12:32 AM, CentricDesigns said:

This doesn't seem to work anymore. Every time I use the above code with my own image URL, nothing shows up in the header.

 

URL: https://www.totallyradsupplements.com/

The code still correct. Which image url did you add the code? 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.