Search code examples
htmlcssmedia-queries

media query not working in mozilla


I have written media query css for both chrome and mozilla.It works fine in chrome.but in mozilla not working

@media screen and (min-height:650px)
 {
  #customerspeak .flexslider .slides .customerBackground img {
  height: 100vh; 
 }
 #customerspeak .flex-direction-nav a {
   margin-top: 37%;
 }
 #customerspeak .flex-next {
  left: 62.5% !important;
 }
 #customerspeak .flex-prev {
  left: 34% !important;   
  }  
 @-moz-document url-prefix() {

   #customerspeak .flexslider .slides .customerBackground img {
   height: 100vh; 
  }
  #customerspeak .flex-direction-nav a {
   margin-top: 37%;
  }
  #customerspeak .flex-next {
  left: 62.5% !important;
 }
 #customerspeak .flex-prev {
 left: 34% !important;   
 }   
}
}

Solution

  • Try using the @-moz-document url-prefix() first before the @media query.

    @-moz-document url-prefix() {
        @media screen and (min-height:650px) {
           /* insert code here*/
        }
    }