title: Check if Div with specific Class exists in the page
body: <p>I'm trying to modify an existing webpage by inserting my own Javascript file in it. I'm setting a background Image for this webpage by inserting a new Div through my Javascript and setting background of that div to image url. For centering this image on background and to make it occupy the whole webpage, I'm using </p>
  
  <pre><code>'background-size': 'cover'
  </code></pre>
  
  <p>property. This of course doesn't work in older IE versions.</p>
  
  <p>I want to fix it, I'm thinking of zooming in the image by specific ratio calculated using page height/width and image height/width.</p>
  
  <p>So I want to detect if browser is IE. I checked the webpage and it has this code that detects browser and add's a div with class IE. </p>
  
  <pre><code>&lt;!--[if lte IE 5]&gt;
    &lt;div class="ie"&gt;
  &lt;![endif]--&gt;
  &lt;!--[if IE 6]&gt;
    &lt;div class="ie ie6"&gt;
  &lt;![endif]--&gt;
  &lt;!--[if IE 7]&gt;
    &lt;div class="ie ie7"&gt;
  &lt;![endif]--&gt;
  </code></pre>
  
  <p><strong>My questions is</strong> how do I detect if this page has a div with class ie. Also, I would really appreciate if someone could suggest an alternative way of setting a background image on the webpage page that occupies it fully irrespective of dimensions of image/page and image center is focused.</p>