Jump to content

CSS for Image overlay mobile ONLY

Recommended Posts

Posted (edited)

SS 7.1

https://www.tsiricos.gr/en/real-estate

From image / Design / Overlay I picked the multiply effect to apply to the house picture ( #block-a64da1b3f8db225771f8 ) . Trying, but failing, to exclude with CSS this effect from Desktop view (or apply to mobile only, whatever comes easier).  Also tried but failed to manually add the overlay form scratch so had to go through the SS engine.

*IF* I get this right, the relevant code from chrome inspection is the following but I cant figure how to modify it OR the correct addresses.

Help is appreciated

 

        .sqs-block-image .sqs-block-content {
          height: 100%;
          width: 100%;
        }
      

      
        .fe-block-a64da1b3f8db225771f8 .fluidImageOverlay {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          mix-blend-mode: multiply;
          
            
            
          
          
            opacity: 1;
          
        }


      

      
   

Edited by takis-7124
web
  • Replies 2
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

To exclude desktop, change code to this

@media screen and (max-width:767px) {
 .sqs-block-image .sqs-block-content {
          height: 100%;
          width: 100%;
        }
      

      
        .fe-block-a64da1b3f8db225771f8 .fluidImageOverlay {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          mix-blend-mode: multiply;
          
            
            
          
          
            opacity: 1;
          
        }
}

 

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!)

Posted

Not that easy this one @tuanphan

I had to use the SS engine to insert the overlay in the picture.  The code I provided is what I estimate to be relevant code as it the only reference I found in my code with "overlay" in. copy/pasting it though in CSS and adding a simple media screen width wont work.  I am therefore assuming that, unless we can manually with CSS stop the overlay effect from displaying in mobile, we must then cancel it altogether and write the entire thing is CSS. So far I havent been able to limit the engine effect to mobile view only, nor have I managed to write code in order to simulate that effect and insert the media screen switch

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.