title: Formatting @HtmlDropDownListFor using htmlAttributes not working when referencing css class
body: <p>This is very strange, or maybe I am just not understanding how this works. I have the below code:</p>
  
  <pre><code>    &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.Department, htmlAttributes: new { @class = "control-label col-md-2" })
          &lt;div class="col-md-10"&gt;
              @Html.DropDownListFor(dep=&gt;dep.DepartmentId,new SelectList(ViewBag.Departments,"Id","Name"), new {htmlAttributes = new {@class="mySelect"}})
              @Html.ValidationMessageFor(model =&gt; model.Department, "", new { @class = "text-danger" })
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>And a style sheet entry:</p>
  
  <pre><code>.mySelect {
      width: 5000px;
      border: groove;
  }
  </code></pre>
  
  <p>This above combination does not format my drop down list, but if I perform direct formatting it works:</p>
  
  <pre><code>    &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.Department, htmlAttributes: new { @class = "control-label col-md-2" })
          &lt;div class="col-md-10"&gt;
              @Html.DropDownListFor(dep=&gt;dep.DepartmentId,new SelectList(ViewBag.Departments,"Id","Name"), new {@style = "width:500px;border:groove;"})
              @Html.ValidationMessageFor(model =&gt; model.Department, "", new { @class = "text-danger" })
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>In addition, if I add the @style to the htmlAttribute section, it does not work, nor does replacing the @style bit with @class="mySelect"...</p>
  
  <p>Thanks!</p>