1. Tables
  2. border-collapse

Tables

border-collapse

Utilities that control whether table cell borders collapse into one or stay separated.

ClassStyles
border-collapse
border-collapse: collapse;
border-separate
border-collapse: separate;

Examples

Merging adjacent borders

Apply the border-collapse utility to fuse adjacent cell borders into one shared line whenever possible:

StateCity
IndianaIndianapolis
OhioColumbus
HighlandAshford
<table class="border-collapse border border-gray-400 ...">  <thead>    <tr>      <th class="border border-gray-300 ...">State</th>      <th class="border border-gray-300 ...">City</th>    </tr>  </thead>  <tbody>    <tr>      <td class="border border-gray-300 ...">Indiana</td>      <td class="border border-gray-300 ...">Indianapolis</td>    </tr>    <tr>      <td class="border border-gray-300 ...">Ohio</td>      <td class="border border-gray-300 ...">Columbus</td>    </tr>    <tr>      <td class="border border-gray-300 ...">Michigan</td>      <td class="border border-gray-300 ...">Detroit</td>    </tr>  </tbody></table>

Keep in mind that this also collapses the borders on the outermost <table> tag.

Separating table borders

Reach for the border-separate utility when you want every cell to render its own distinct borders:

RealmTown
VerdantBrightmeadow
ValeOakhaven
HighlandAshford
<table class="border-separate border border-gray-400 ...">  <thead>    <tr>      <th class="border border-gray-300 ...">State</th>      <th class="border border-gray-300 ...">City</th>    </tr>  </thead>  <tbody>    <tr>      <td class="border border-gray-300 ...">Indiana</td>      <td class="border border-gray-300 ...">Indianapolis</td>    </tr>    <tr>      <td class="border border-gray-300 ...">Ohio</td>      <td class="border border-gray-300 ...">Columbus</td>    </tr>    <tr>      <td class="border border-gray-300 ...">Michigan</td>      <td class="border border-gray-300 ...">Detroit</td>    </tr>  </tbody></table>

Responsive design

Add a breakpoint variant such as md: ahead of a border-collapse utility so the styling only kicks in on medium screens and larger:

<table class="border-collapse md:border-separate ...">  <!-- ... --></table>

Read more about applying variants in the variants documentation.

Copyright © 2026 Breezel, Inc.·Trademark Policy