title: Web2Py CSS style in IMG()
body: <p>I'm trying to get the basic syntax for setting a CSS <code>&lt;style&gt;</code> using a call to <code>{{=IMG()}}</code> in Web2Py. I've tried the following:</p>
  
  <pre><code> &lt;style&gt;img.bottom { vertical-align: text-bottom; } &lt;/style&gt;
   &lt;body&gt;
       {{=IMG(_src=URL('static',args='images/golem.jpg', _style='img.bottom'),_alt="golem"}}
   &lt;/body&gt;
  </code></pre>
  
  <p>fail</p>
  
  <pre><code> &lt;body&gt;
       {{=IMG(_src=URL('static',args='images/golem.jpg', styles={'CODE':'vertical-align: text-bottom;'}), _alt="golem")}}
   &lt;body&gt;
  </code></pre>
  
  <p>also fail</p>
  
  <pre><code> &lt;style&gt;img.bottom { vertical-align: text-bottom; } &lt;/style&gt;
   &lt;body&gt;
        {{=IMG(_src=URL('static',args='images/golem.jpg'), _style='bottom',_alt="golem"}}
   &lt;/body&gt;
  </code></pre>
  
  <p>also fail</p>
  
  <pre><code> &lt;style&gt;img.bottom { vertical-align: text-bottom; } &lt;/style&gt;
   &lt;body&gt;
        {{=IMG(_src=URL('static',args='images/golem.jpg'), _class='bottom',_alt="golem"}}
   &lt;/body&gt;
  </code></pre>
  
  <p>also fail</p>
  
  <p>I feel like I must be close but I can't find an argument for style to <code>IMG()</code> in the docs and I can't seem to override the (non)style that's present.</p>
  
  <p><a href="http://www.web2py.com/books/default/chapter/29/05/the-views#IMG" rel="nofollow">Just in case anyone wants to see the Web2Py docs where the answer is not</a></p>