Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@-moz-document and @media together

How can I combine above prefixes? This doesn't work:

@media screen and (max-width: 991px) and (min-width: 768px) {

    @-moz-document url-prefix()   { 
    .navbar-default .navbar-brand  {margin-left:30%;}
    }
}

And @media inside of @-moz-document url-prefix() also deosn't work.

like image 811
Dandy Avatar asked Jul 13 '15 09:07

Dandy


Video Answer


2 Answers

It works fine for me by using the @-moz-document at first and the @media query inside:

@-moz-document url-prefix() {
    @media screen and (max-width: 991px) and (min-width: 768px) {
        .navbar-default .navbar-brand  {margin-left:30%;}
    }
}

Demo: JSFiddle

like image 74
KittMedia Avatar answered Oct 28 '22 00:10

KittMedia


Every pseudo-element must be valid within a rule, otherwise the whole rule is dropped.

Refer to: https://developer.mozilla.org/en-US/docs/Web/CSS/@document, and http://www.w3.org/TR/css3-syntax/#rule-sets

like image 29
Lansana Camara Avatar answered Oct 27 '22 23:10

Lansana Camara