How to use Media query in css

 

I want to make responsive web page so I need to use media query in css. How can I use this media query in css to make it device dependent


Answer
 

use meta tag in your head tag to make web page responsive:
<meta name="viewport" content="width=device-width, initial-scale=1.0">


 

@media only screen and (max-width: 768px) {
 selector{.............}
}

@media only screen and (min-width: 600px) {

selector{.............}

}