title: Printing specific div content with css media type print?
body: <p>i have html which contain frames like below</p>
  
  <pre><code>  &lt;frameset rows="60,*" border="0" frameborder="0"&gt;
      &lt;frame name="frameA"&gt;
      &lt;frameset cols="120,*" &gt;
        &lt;frame name="frameB" frameborder=0 &gt;
        &lt;frame name="frameC"&gt;
      &lt;/frameset&gt;
    &lt;/frameset&gt;
  </code></pre>
  
  <p>Inside frame C i have div with id "myDivToPrint". I want when user click browser print,
    it just print the content of div myDivToPrint. Here is my relevant css</p>
  
  <blockquote>
    <p>CSS</p>
  </blockquote>
  
  <pre><code>@media print {
      #myDivToPrint {
          background-color: white;
          height: 100%;
          width: 100%;
          position: fixed;
          top: 0;
          left: 0;
          margin: 0;
          padding: 15px;
          font-size: 14px;
          line-height: 18px;
      }
  }
  </code></pre>
  
  <blockquote>
    <p>html</p>
  </blockquote>
  
  <pre><code> &lt;div  id="myDivToPrint" class="page-container myDivToPrint"&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>But it does not seem to have any impact on print/print preview(firefox displays all frame content and chrome displays only 
  top frame content under print preview). Any ideas?</p>
  
  <p>Reference for above approach :- BC post at <a href="https://stackoverflow.com/questions/2255291/print-the-contents-of-a-div">Print the contents of a DIV</a></p>