title: How to set fluid column width in kableExtra?
body: <p>I'd like to have fluid columns, with a certain maximum width (say 6em) and a minimum width (say 1em), irrespective of the content.</p>
  <p>How can I achieve this with <code>kableExtra</code>?</p>
  <p>My attempt so far:</p>
  <pre class="lang-r prettyprint-override"><code>library(kableExtra)
  
  df = data.frame(A = c(&quot;Fixed width&quot;), B = &quot;Fixed width&quot;, C = &quot;Fluid (min width 1em)&quot;, D = &quot;Fluid (min width 1em)&quot;,
                  E = &quot;Fluid (min width 1em)&quot;, F = &quot;Fluid (min width 1em)&quot;, G = &quot;Fluid (min width 1em)&quot;, H = &quot;Fluid (min width 1em)&quot;)
  
  kableExtra::kbl(df, table.attr = &quot;table-layout: fixed&quot;) %&gt;% 
      column_spec(1, width = &quot;5em&quot;) %&gt;%
      column_spec(2, width = &quot;5em&quot;) %&gt;% 
      column_spec(3, bold = TRUE, width_max = &quot;20m&quot;, width_min = &quot;1em&quot;, extra_css = &quot;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;&quot;) %&gt;% 
      column_spec(4, bold = TRUE, width_max = &quot;20m&quot;, width_min = &quot;1em&quot;)
  </code></pre>