How to add media query in css

  1. To give different style rules for different media types. example ipad, mobile, tablet etc.
  2. To add media query in css file, Kindly find below.

@media  mediatype and(expressions)

 {
   

write the css code here………………………

}
* Here in mediatype section, we need to add the type of device the document is being displayed on screen.

  • And in expression section, we need to add maximum or minimun witdh of device view.
  • Here the example

@media screen and (max-width: 992px) 

{
  body {
    css code here……………………
   }
}

Leave a comment

Your email address will not be published. Required fields are marked *