0

I am applying hover state styling to a div like this:

 div {    

     &:hover {
            color: red !important;
            border: 3px solid red !important;
        }
 }

Now, i do not want to apply this css style to ipads and other tablets. So, i added a media query like this

   div {   

      @media only screen {

         &:hover {
                color: red !important;
                border: 3px solid red !important;
            }

        }
     }

I also tried this

div {   

  @media not handheld {

     &:hover {
            color: red !important;
            border: 3px solid red !important;
        }

    }
 }

But, the hover styling still gets applied on ipad. I am new to media queries.

Any idea how can i achieve that using css/less/media queries or what am i doing wrong here?

Thank you!

Cute_Ninja
  • 4,742
  • 4
  • 39
  • 63

1 Answers1

1

Thanks to @Ashish and @DOC ASAREL, setting min-width did the trick.

This is the solution:

@media (min-width: 1281px)  {
            &:hover {
                color: red !important;
                border: 3px solid red !important;
            }
        }
Cute_Ninja
  • 4,742
  • 4
  • 39
  • 63