Nnah Kenneth
Nnah Kenneth

Reputation: 47

mobile query takes over the desktop view

This code written on top my stylesheet should change my text color to red in a desktop view

.info-paragraph{
   color: red;
}

Media query for the same code on mobile phones display

@media screen and (min-width: 768px){
    .info-paragraph{
      color: white;
      font-size: 2.855rem;
      line-height: 3rem;
      font-family: 'Mallanna', sans-serif;
      font-weight: 900;
    }

Result: My code works perfectly with the set media query for mobile phones, but its quite strange why color:red will not work in desktop view. What am I doing wrong guys?

Upvotes: 1

Views: 28

Answers (1)

Adam Torok
Adam Torok

Reputation: 71

You should try using max-width instead of min-width, everything inside that media query should run fine!

Upvotes: 3

Related Questions