Answers for "media query max width and height"

CSS
51

media query

@media only screen and (max-width: 600px) {
  body {
    background-color: lightblue;
  }
}
Posted by: Guest on December-06-2019
7

min and max width media query

@media (max-width: 989px) and (min-width: 768px) {}
Posted by: Guest on February-20-2020
1

hegith specific css in media query

/* Exact height */
@media (height: 360px) {
  div {
    color: red;
  }
}

/* Minimum height */
@media (min-height: 25rem) {
  div {
    background: yellow;
  }
}

/* Maximum height */
@media (max-height: 40rem) {
  div {
    border: 2px solid blue;
  }
}
Posted by: Guest on June-22-2020
1

what is a max and min width media query

/* What this query really means, is If [device width] is less than or equal to 600px, then do */
@media only screen and (max-width: 600px)  {...}

/* What this query really means, is If [device width] is greater than or equal to 600px, then do */
@media only screen and (min-width: 600px) {...}
Posted by: Guest on December-21-2020

Code answers related to "media query max width and height"

Browse Popular Code Answers by Language