title: Blazor rendering of table column widths
body: <p>I have a Microsoft Blazor project. I'm trying to get Razor to change the column widths of a table dynamically. I couldn't get it to work, so I created this very stripped down version for testing. The following code creates two tables. In the first one, there is no Razor code and the widths render correctly. In the second, the widths are ignored, even though they are hard-coded. In the non-stripped down version, I set the visibility of the column and the text of the header using Razor and it works fine. It's only the width that is ignored.</p>
  <pre><code>    &lt;table&gt;
          &lt;thead class=&quot;thead-light&quot;&gt;
              &lt;tr&gt;
                  &lt;th WIDTH=&quot;100&quot;&gt;Column 1&lt;/th&gt;
                  &lt;th WIDTH=&quot;200&quot;&gt;Column 2&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
      &lt;/table&gt;
      &lt;table&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  @foreach (var col in Columns)
                  {
                      &lt;th WIDTH=&quot;300&quot;&gt;Column 1&lt;/th&gt;
                  }
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
        ...
  </code></pre>
  <p><a href="https://i.stack.imgur.com/VP3Ee.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VP3Ee.jpg" alt="Resulting column headers" /></a></p>