title: Keeping CSS styling when loading html page using InnerHTML
body: <p>Using this code below I can load an HTML page to a div, in my site, by clicking a link in my menu.</p>
  
  <p>Now, the problem is that when it loads the HTML page into the div, it loads just fine... but without its original background color that should be loaded with the other content of the HTML page as well. All the other CSS elements seem to be just fine.</p>
  
  <p>Thank you in advanced.</p>
  
  <p>js code:</p>
  
  <pre><code>function processAjax(url) 
  { 
      if (window.XMLHttpRequest) { // Non-IE browsers 
          req = new XMLHttpRequest(); 
          req.onreadystatechange = targetDiv; 
          try { 
              req.open("GET", url, true); 
          }
          catch (e) { 
               alert(e); 
          } 
          req.send(null); 
      } else if (window.ActiveXObject) { // IE 
            req = new ActiveXObject("Microsoft.XMLHTTP"); 
               if (req) { 
                 req.onreadystatechange = targetDiv; 
                 req.open("GET", url, true); 
                 req.send(); 
  
      } 
  } 
  return false; 
  } 
  
  function targetDiv() { 
      if (req.readyState == 4) { // Complete 
            if (req.status == 200) { // OK response 
                document.getElementById("containerDiv").innerHTML = req.responseText; 
            } else { 
              alert("Problem: " + req.statusText); 
            } 
      }  
  }
  </code></pre>
  
  <p>html: </p>
  
  <pre><code>&lt;a onclick="return processAjax(this.href)"  href="example.html"&gt;CLICK ME&lt;/a&gt;
  &lt;div id="containerDiv"&gt;&lt;/div&gt;     
  </code></pre>