title: Is it OK to write Javascript code to solve a browsers compatibility issue?
body: <p>Is it OK to write Javascript code to solve a browsers compatibility problem or I should never need that and everything should be solved using CSS only?</p>
  
  <hr>
  
  <p><strong>My problem</strong>: </p>
  
  <p>I have a menu in an ASP.Net application, this menu renders a hidden image control supposing that <code>height=0</code> and <code>width=0</code> will not render anything. That's true in IE but it keeps an empty area in Chrome and it looks ugly.</p>
  
  <p>This is the generated code:</p>
  
  <pre><code>&lt;img alt="Skip Navigation Links" src="/WebResource.axd?d=6z..." 
       width="0" height="0" style="border-width:0px;" /&gt;
  </code></pre>
  
  <p>I wrote the following code to solve the problem:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $('img[height="0"]').css('display', 'none');
  &lt;/script&gt;
  </code></pre>
  
  <p>Is what I did true and the only way to solve such problems?</p>
  
  <p><strong>Note</strong>: The code in my example is <strong><em>generated</em></strong> for an ASP.Net menu control and I have no access on it to set a specific style</p>