Is it possible to use 2 @media screen?

Asked

Viewed 44 times

-1

I have a problem, I use Media Queries: @media screen and it is configured with max-widht:375px. want to put a @media screen to max-widht:1024

Has as?

  • 1

    Yes, it is possible. When you close the keys of one, you can create the other. Read more: https://www.w3schools.com/css/css_rwd_mediaqueries.asp

  • This may help you: https://answall.com/questions/224216/porque-media-queries-worklike this

  • https://answall.com/questions/58524/como-eu-trabalho-com-design-responsivo/58525#58525

1 answer

1

Yes. It has a way You can declare one and the other this way:

@media screen and (max-width:1024px){
    .tela{ 
         width: 400px;
     }
}
@media screen and (max-width:375px){
    .tela{ 
         width: 250px;
     }
}

if it is just an element, you can also use Jquery to do this check. If you want to be informed, follow the link

Browser other questions tagged

You are not signed in. Login or sign up in order to post.