Jump to content

Replacing a specific image for mobile view

Recommended Posts


I'm having a few problems with one of my clients' website.

She would like a different version of her logo to be on a mobile view, I have tried some code but the image isn't showing in full.

I've used this code:

@media screen and (max-width:767px) {
div#block-yui_3_17_2_1_1692109429145_3484 img {
    content: url(https://static1.squarespace.com/static/62681359eb930e7e05951164/t/659f02656aaf303002d9c892/1704919653971/Clare_Logo_Dev_Final-06.png);
    height: auto !important;
    top: 0% !important;
    padding-bottom: 0% !important;
    transform: translateY(-50%);

But this is how the image is showing?



It's meant to be like this...



What bit of code am I missing, to show this logo in full, but to still keep the logo the same on desktop?

PW: Dodger50!


Thanks in advance,


Link to comment
  • Replies 2
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

You can use this CSS code

@media screen and (max-width: 767px) {
    div#block-yui_3_17_2_1_1692109429145_3484 img {
        position: static !important;
div#block-yui_3_17_2_1_1692109429145_3484 .fluid-image-container {
    overflow: visible !important;
    height: auto !important;


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.