Jump to content

Different image on mobile

Recommended Posts

  • Replies 4
  • Views 508
  • Created
  • Last Reply

Top Posters In This Topic

16 minutes ago, minnieosc123 said:

Hi, I want to have a different image on mobile as the space between the content on the homepage banner and the menu on mobile is too large (alwaysajt.com) I'm happy with how it looks on desktop.

Thanks

Jessica

We can add 2 sections/images and use css code to hide the appropriate element based on the media query of device.

You can add 1 more and share the direct link to this page so I can give the css code

Edited by Beyondspace

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 11/30/2022 at 9:07 PM, Beyondspace said:

We can add 2 sections/images and use css code to hide the appropriate element based on the media query of device.

You can add 1 more and share the direct link to this page so I can give the css code

Thank you. I've added the extra pic on the homepage for mobile. So the 2nd image is for mobile. its alwaysajt.com

Link to comment
On 12/6/2022 at 6:12 PM, minnieosc123 said:

Thank you. I've added the extra pic on the homepage for mobile. So the 2nd image is for mobile. its alwaysajt.com

Add to Design > Custom CSS

/* Hide second image on desktop */
@media screen and (min-width:768px) {
	[data-section-id="638f231256b39b511b209bfa"] {
		display: none;
}
}
/* hide top image on mobile */
@media screen and (max-width:767px) {
	[data-section-id="633c240afe2c8c221626920e"] {
		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

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.