Answers for "css check screen size"

CSS
1

how to specify css for smaller screen

@media only screen and (max-width: 991px) and (min-width: 769px){
 /* CSS that should be displayed if width is equal to or less than 991px and larger 
  than 768px goes here */
}

@media only screen and (max-width: 991px){
 /* CSS that should be displayed if width is equal to or less than 991px goes here */
}
Posted by: Guest on January-20-2022
0

css for bigger screen size

@media screen and (min-width: 1400px) {
  .container {
    width: 1370px;
  }
}
@media screen and (min-width: 1600px) {
  .container {
    width: 1570px;
  }
}
@media screen and (min-width: 1900px) {
  .container {
    width: 1870px;
  }
}
Posted by: Guest on January-06-2022
3

width in % of a screen css

1vw = 1% of viewport width
1vh = 1% of viewport height
Posted by: Guest on February-05-2021

Browse Popular Code Answers by Language