Jump to content

Adding a Background Image on a Single Page in 7.0??

Recommended Posts

Site URL: https://www.honeyphillips.com/olivia-and-the-orc-v2

Hello, 

I am having issues adding custom CSS for a background image on a single page using the code injector.   It shows mostly okay in the editor, with the exception of a weird gap, but does not show on the front end.  I am fairly new to CSS and I am not sure where I went wrong with the code.   Can anyone advise? 

 

Image 1 (Editor)

2122926940_ScreenShot2022-05-25at6_38_08PM.thumb.png.2fe08744b513fb30fd52a3923934e6cf.png

 

Image 2 (Front-End)

116350400_ScreenShot2022-05-25at6_39_08PM.thumb.png.454fae4a5aaefbd31d3858b88d8e901c.png

 

Code Used:

<style>
.Header, .Footer, .Mobile-bar {
display:none !important;
}
  body:before{
  background-image: url(https://static1.squarespace.com/static/5ccbb149a568273fb0aad690/t/628e8efa8826f40d5709c685/1653509883202/Screen+Shot+2022-05-25+at+4.13.57+PM.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: '';
  height: 100%;
  opacity: .2;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: -10;
}
  .Index-page,
.Header--bottom {
  background-color: transparent;
}

#about h1,
#about p {
  color: white;
</style>

Link to comment
  • Replies 3
  • Views 215
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Where are you entering the CSS? I'm not seeing hide nor hare of it on the page.

Design > Custom CSS? Or, Page Settings > Advanced > Page Header Code Injection for the page? Or a code block?

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.