title: Yii: How to add CSS class to a dropdown list
body: <p>I am using Yii 1.1.10. I would like to know how to add a CSS class to a dropdown list.
  I am using a CActiveForm</p>
  
  <p>for example, how would i add a CSS class to this dropdown list?</p>
  
  <pre><code>&lt;?php echo $form-&gt;labelEx($model,'chassis'); ?&gt;
  &lt;?php echo $form-&gt;dropDownList($model, 'chassis',
        array('saloon' =&gt; 'saloon', 'station wagon' =&gt; 'station wagon', ),
     ); 
  ?&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong>
  I had this in my code</p>
  
  <pre><code> array('empty' =&gt; 'Select one of the following...')
  </code></pre>
  
  <p>i had it there to make it the default message. but somehow it interfered with using</p>
  
  <pre><code>'htmlOptions'=&gt;array('class'=&gt;'yourCssClass')
  </code></pre>
  
  <p><strong>OR</strong></p>
  
  <pre><code>array('class'=&gt;'your_class_name')
  </code></pre>
  
  <p>so as long as i remove it, both suggestions work!Thank guys</p>