How To Show A Different Background Image on Mobile in Squarespace 7.1 // Squarespace CSS Tutorial

Just getting started with Squarespace CSS? Awesome! 😍 I want to teach you the basics – grab my free Getting Started Guide here πŸ‘‰ https://insidethesquare.co/learn
β€”
πŸ₯³ Ready to launch ? Use the code PARTNER10 for 10% off (affiliate code): https://insidethesquare.co/partner10
β€”
πŸ’• Love this free Squarespace tutorial? You can donate via Paypal to help support my YouTube Channel here πŸ‘‰ https://www.paypal.com/paypalme/insidethesquare
β€”
This tutorial is specific for Squarespace version 7.1 – if you are using an older version of Squarespace built on the brine theme, check out this tutorial instead: https://youtu.be/loXInhARObE
β€”

In this tutorial I am going to show you how to use custom CSS in Squarespace to change a section background image on mobile devices.

A few important things to note before you copy and paste the code below into your own site:

πŸ–ΌοΈ Be sure to check the focal point for your image – you might not need to use CSS to make your mobile site look better!

✨ There is more than one way to do this! This is just one approach of many because code is super customizable.

πŸ”— Here is a link to the tutorial on how to install this code on a single page in your Squarespace site: https://www.youtube.com/watch?v=kX6kRjCbzu8

πŸ™‹ Need some help? Visit ​https://insidethesquare.co/code-help​ to see my current support options.

This code will remove the background image, leaving the solid color behind your text.
@media only screen and (max-width: 640px){
.section-background img { opacity:0!important }}

Use this code to replace the background image of a certain section with an image you upload. Be sure to change the text β€œyour image url here” with the url for the image you upload! Also, don’t forget to change the 1 in nth-child(1) to represent the order number of the section you want to change. Be sure to add this on a single page using page header code injection, check the comments for some details on that or watch this tutorial here:https://www.youtube.com/watch?v=kX6kRjCbzu8

@media only screen and (max-width: 640px){
#page .page-section:nth-child(1) .section-background img {opacity:0 }
#page .page-section:nth-child(1) .section-background {
background-image: url(your-image-here);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
}

β€”
🀩 Ready for more codes? The codes in this tutorial are just the beginning of all the cool things you can do with Custom CSS! When you’re ready to dive in and start customizing, you can use codes from my CSS Cheat Sheet. It has over 30 pages of code snippets and pro tips to help you get started. Download your copy πŸ‘‰ https://InsideTheSquare.co/css
β€”
πŸ₯³ Ready to launch ? Use the code PARTNER10 for 10% off (affiliate code): https://insidethesquare.co/partner10 ❀️
β€”
πŸ™‹ Need some help? Visit ​https://insidethesquare.co/code-help​ to see my current support options.
β€”
The term β€œSquarespace” is a trademark of Squarespace, Inc. This content is not affiliated with Squarespace, Inc. I just really love their platform β™₯
β€”
#squarespace #squarespacecss #howto #customizesquarespace #css #squarespacetricks #squarespacehacks #squarespacetips

You May Also Like