title: Internet Explorer and Border around Image IN iFrame
body: <p>so I am trying to fix some css issues with a site I am working on, and everything looks pretty much the same except for 1 iFrame element.</p>
  
  <p>The iFrame contains a picture that is randomly generated, and a button that you click that will redirect you to another page. All functionality works, its just the styling. No matter what I try I cannot remove a 2px border around an img tag thats embedded inside an iFrame element. On the actual page that I am putting in an iFrame, there is no border around the image in all 3 browsers, so for some reason IE wants to put another border on this img tag when its in an iFrame on the main page...</p>
  
  <p>This is the iFrame embedded in the main page.</p>
  
  <pre><code>&lt;iframe src="~/Photos/PhotoViewer.aspx" runat="server" scrolling="no" frameBorder="0" class="PhotoViewer"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>and this is the css class</p>
  
  <pre><code>.PhotoViewer
  {
      height: 200px;
      width: 100%;
      margin-left: 0px;
      outline: 0px;
      border:none;
      outline:none;
  }
  </code></pre>
  
  <p>This is part of the embedded page</p>
  
  <pre><code>.noBorder
  {
      border:none;
      outline:none;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form runat="server" class="noBorder" style="margin:0px;"&gt;
      &lt;asp:HyperLink runat="server" NavigateUrl="~/Photos/Default.aspx" Target="_parent" class="noBorder"&gt;&lt;img id="randPhoto" runat="server" alt="Photo Unavailable" class="noBorder"/&gt;&lt;/asp:HyperLink&gt;
      &lt;div style="border:none"&gt;
          &lt;asp:Button runat="server" ID="btnUploadPhoto" OnClick="btnUploadPhoto_Click" class="button" style="border:none"/&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I have tried using most suggestions I could find on this site such as:</p>
  
  <pre><code>a, img {border:none;}
  img {border:none;}
  </code></pre>
  
  <p>I used the css debugging feature for IE (F12) and I have found that even with me putting all these border: none/border: 0px around the img it still puts a 2px border around it. How can I force a css style onto an img element inside an iFrame?</p>