Why element CSS not Work for all resolutions?

When adding any CSS that only applied to min-width:1600px instead to work for all resolutions. Is there any issue?

Screenshot 2022-01-21 at 23.51.45

image

Hello @hlbcode,

Thanks for writing in!

Please check out this documentation first:

Adding the following code will be applied to all screen sizes:

$el {
  background-color: white;
} 

If you want to specifically apply the code to a particular screen size, you can use the one from your screenshot:

$el {
  background-color: white;
} 

@media only screen and (min-width:1600px){
    $el {
      background-color: gray;
    }  
}

The code above will apply a white color to all screen size and it will only turns to gray when the screen size is. equal or greater than 1600 pixels.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.