Jump to content

7.1 different banner image for mobile

Recommended Posts

Hi there,

I found several threads for this topic but nothing that has worked for me.
this is my landing page url:
deleted

 

for the mobile view, I would like to hide the current (desktop) banner image and replace it with this one:

jpeg

 

when using the code below, I also hide the logo image which I want to stay.

Quote

 

#collection {
#page .page-section:nth-of-type(1) {
img {
display: none;
}

#collection
.sqs-block-image img {
display: block;
}
  
#collectio
.section-background {
background: url("https://images.squarespace-cdn.com/content/5f6f38062982486253146867/1606691949125-TVQIWD26HVHIITUNDUCH/eco-chalets-mobile.jpg?format=100w&content-type=image%2Fjpeg");
background-repeat: no-repeat;
background-size: 100%;
}
}
}

 

 

I couldn't figure out the desktop banner id...

Hope anyone can help me.
Thanks a lot!

Link to comment
  • Replies 4
  • Views 944
  • Created
  • Last Reply
On 12/5/2020 at 6:48 PM, ando_337 said:

Thank you!
I added the mobile banner underneath:
https://www.inneco.de/eco-basic-eco-premium

Add to Home > Design > custom CSS

/* remove bottom banner in desktop */
@media screen and (min-width:768px) {
[data-section-id="5fcb7072a51c5a1401a9ba5e"] {
    display: none;
}
}
/* remove top banner on mobile */
@media screen and (max-width:767px) {
[data-section-id="5fc3e08408845d092400c576"] {
    display: none;
}
}

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.