0
0
0_ficus_02018-03-25 16:05:19
css
0_ficus_0, 2018-03-25 16:05:19

Media queries not working when zooming out?

@media (max-width: 320px) {
  
}

@media (max-width: 480px) {
  
}

@media (max-width: 768px) {
  
}

@media (max-width: 992px) {
  
}

@media (max-width: 1200px) {
  .top-mnu 
    .a
      font-size: 15px;
  .top-phone 
    .li 
      .a
        font-size: 20px;
}

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Stalker_RED, 2018-03-25
@Stalker_RED

work https://jsfiddle.net/zm0on8y3/show/

D
doweb, 2018-03-25
@kostya_dev

Maybe a syntax problem?
If curly braces are not used when working with a selector {}, then they should not be used with media queries either?
Try like this:

@media (max-width: 1200px)
  .top-mnu 
    .a
      font-size: 15px;
  .top-phone 
    .li 
      .a
        font-size: 20px;

O
Olga Veter, 2018-03-26
@vetero4eg

so your last one @mediawill act on all screens smaller than 1200px wide and will interrupt all previous ones you wrote @media. Either change their order, from larger to smaller, or rewrite @mediaunder min-width
Well, you were also correctly written about brackets. If you use the syntax without brackets, they should not be here either

C
Chaly95, 2018-03-26
@chaly95

Try like this

@media screen and (max-width: 320px) {
   тут код
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question