Search code examples
cssresponsive-designmedia-queries

media query not being applied @media screen and (max-width:960px}


On this page, I have layout:

<body>
  <div id="container">
        ...
  </div>
</body>

and CSS:

#container {
    width: 960px;
    margin: 1em auto;   
}
@media screen and (max-width:960px} {
    #container {
        width: 100%;
    }   
}

However, when I view the page in Firefox responsive view, the #container does not shrink to 100% width when the view port is less than 961px.


Solution

  • Change the } that is after the (max-width:960px} to be a )