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