user7047368 user7047368 - 22 days ago 7
CSS Question

Macbook Pro not accepting media query using CSS

I have written this media query for Macbook Pro. It is not accepting the media query. My Macbook's resolution is 1200x800.

@media only screen
and (min-device-width : 1200px)
and (max-device-width : 800px)
{
.col-md-12.webtestingsocial
{
margin-left: 29px !important;
}
}

Answer

It should work this way:

@media screen and (min-width: 800px) and (max-width: 1200px) {

   /* Your Styles */
 }

Also make sure you have this tag inside the HEAD

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