title: Bootstrap Table width fills screen - thymeleaf/springboot
body: <p>I am using bootstrap in my html thymeleaf template as follows:</p>
  <pre><code>&lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css&quot; 
    rel=&quot;stylesheet&quot; 
    integrity=&quot;sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We&quot; 
    crossorigin=&quot;anonymous&quot;&gt;
  
  &lt;table class=&quot;table table-striped table-sm&quot; &gt;
          &lt;thead&gt;
              &lt;th&gt;delete&lt;/th&gt;
              &lt;th&gt;Edit&lt;/th&gt;
              &lt;th&gt;Consult Date&lt;/th&gt;
              &lt;th&gt;Reservation Number&lt;/th&gt;
              &lt;th&gt;dispense details&lt;/th&gt;
  </code></pre>
  <p>The  table is stretched the width of my screen. How do I make table use 50-60% of the screen width?</p>
  <p><a href="https://i.stack.imgur.com/VTO7m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VTO7m.png" alt="enter image description here" /></a></p>