Jump to content

Remove text box hover overlay on mobile view

Go to solution Solved by Lesum,

Recommended Posts

Posted

I have a colored text box overlay that appears on hover over the images on my homepage. I want these to disappear on mobile, but I can't figure out the code. The code I'm using for each text box hover is below, I'm not sure why the min-width:767px isn't working.

Site is https://www.juliaalberts.com/

 

Quote

 

@media only screen and (min-width: 767px){

#block-a28c8ca60649de165aa8 {

opacity: 0;

 transition: opacity 1s

}

#block-a28c8ca60649de165aa8:hover {

opacity: 1;

transition: opacity .3s

}

}

#block-a28c8ca60649de165aa8 {

   cursor: pointer;

}

#block-a28c8ca60649de165aa8 a {

   position: absolute;

   top: 0;

   left: 0;

   width: 100%;

   height: 100%;

   display: flex;

   align-items: center;

   justify-content: center;

   text-decoration: none;

}

 

 

  • Solution
Posted

@julalberts5 Hi! You can add this code in Website > Pages > Website Tools > Custom CSS to hide the colored text boxes on image hover:

@media screen and (max-width: 767px) {
   section[data-section-id="65e7aee2ef5439016b8aaa76"] .fe-block:has(h1) {
      display: none !important;
   }
}

 

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

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.