Search code examples
csshtmlfixed

Disapearing fixed div on window resize


The fixed panel on http://mondaybynoon.com/ disappears, when the window has a width<960. No JS is used for that. Can someone explain, how it is implemented?


Solution

  • He is use media query for that responsive website.

    You can define in HTML like this:

    <link rel='stylesheet' media='screen and (max-width: 900px)' href='css/medium.css' />
    

    OR You can define in CSS like this:

    @media screen and (max-width: 900px){
      body {
        background: #ccc;
      }
    } 
    

    check these articles for more http://css-tricks.com/css-media-queries/ , http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/