responsive css code example

Example 1: media query

@media only screen and (max-width: 600px) {
  body {
    background-color: lightblue;
  }
}

Example 2: responsive img

.responsive-img {
  max-width:100%;
  display:block;
  height:auto;
}

Example 3: responsive html

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Example 4: media query in css

@media screen and (min-width: 374px){
   section#rent_sectionn {
    padding: 0 20px !important;
}
 }

Example 5: css media query responsive sizes

320px
480px
600px
768px
900px
1024px
1200px

Example 6: media query

@media only screen and (max-width: 600px) {
  .class {
    // Your CSS
  }
}