title: Simple button to close layer div using css javascript
body: <p>I Just can't find the answer to this.</p>
  
  <p>I have a div in my webpage, above on a different layer. I simply want to have a button or  tag inside this div which will hide it. I have tried:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script language="javascript"&gt;
   myFunction()
   {
   document.getElementById("corporate_background").setAttribute("style", "display:none;");
   }
   &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;aajhahaksha&lt;/p&gt;
  &lt;div id="corporate_background"&gt;
  &lt;a href="javascript:myFunction()"&gt;Close&lt;/a&gt; 
  &lt;P&gt;content...&lt;/P&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>Could someone please show me where I have gone wrong.</p>