R
R
Ruslan Absalyamov2018-07-28 14:53:41
css
Ruslan Absalyamov, 2018-07-28 14:53:41

Why is my layout not applied in @media?

I am using this code

.focus-form{
  width: 24%;
  float: right;
  padding: 10px;
  background: rgba(255, 255, 255, 0.91);
  margin-top: 6%;
  margin-right: 13%;
  text-align: center;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
  h4:first-child{
    font-weight: bold;
  }
  p{
    font-size: 21px;
    span{
      font-weight: bold;
    }
  }
}
@media (min-width: 320px) and (max-width: 1455px){
  .focus-form{
    width: 40%;
  }
}

@media screen and (max-width: 320px){
  .focus-form{
    width: 79%;
  }
}

But for some reason it is not applied, that is, the standard .focus-form and media (min-width: 320px) and (max-width: 1455px) are applied, and then media screen and (max-width: 320px)
are no longer applied. be?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ruslan Absalyamov, 2018-07-28
@rusline18

media only screen and (min-width: 600px)

A
Alex-1917, 2018-07-28
@alex-1917

min-width: 320px
max-width: 320px

at least it’s impossible, as a maximum, the author of such a code is a hack.

M
Maxim Devda, 2018-07-28
@maksdevda

media screen and (max-width: 319px)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question