title: How can I set table column widths in an MVC view?
body: <p>I am using the default, design-time scaffolded view for a list, in an MVC4 Razor app. Each column is as follows:</p>
  
  <pre><code>&lt;td class="col-code"&gt;
      @Html.DisplayFor(modelItem =&gt; item.Code)
  &lt;/td&gt;
  </code></pre>
  
  <p>I have tried adding a <code>width</code> attribute to the TD's, but seems to have no effect. The only thing that works is styling the INPUT rendered by <code>DisplayFor</code>, but I can't do that here as I have nowhere to set html attributes.</p>