title: How to set column width in a html table with boostrap 4 and html helpers?
body: <p>I have a very simple table with 2 columns and an extra one just to add a button in td elements of body:</p>
  
  <pre><code>&lt;table class="table table-hover"&gt;
      &lt;thead class="table-info"&gt;
          &lt;tr&gt;
              &lt;th class="text-center"&gt;
                  @Html.DisplayNameFor(model =&gt; model.Code)
              &lt;/th&gt;
              &lt;th class="text-center"&gt;
                  @Html.DisplayNameFor(model =&gt; model.Name)
              &lt;/th&gt;
              &lt;th&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  @Html.EditorFor(model =&gt; model.Code)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.EditorFor(model =&gt; model.Name)
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;button type="button" class="btn btn-danger"&gt;Delete&lt;/button&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>This is the visual result: <a href="https://i.stack.imgur.com/N4itK.png" rel="nofollow noreferrer">image</a>
  <br /></p>
  
  <p>But I want the first column to be much smaller than the second, like 25% of the table, or something around that. I have tried to set the <strong>th</strong> element to that value, but the result remains the same. Something like:</p>
  
  <pre><code>&lt;th class="text-center" style="width:25%;"&gt;
      @Html.DisplayNameFor(model =&gt; model.Code)
  &lt;/th&gt; 
  </code></pre>
  
  <p>I'm using ASP.NET Core 2.1 + MVC + Razor</p>
  
  <p>I think the main problem it's on the asp.net html helpers. How can I accomplish the expected behaviour, please?</p>