col-span-full: Tailwind CSS Grid class

The col-span-full class spans the element across all columns, regardless of the grid's column count.


col-span-full

The col-span-full class spans the element across all columns, regardless of the grid's column count.

Example Code

html
<div class="rounded-t-md p-4 bg-indigo-50">
<div class="grid grid-cols-6 gap-4">
<div
class="bg-indigo-500 text-white p-4 font-bold text-center col-start-1 col-span-3"
>
A
</div>
<div class="bg-indigo-500 text-white p-4 font-bold text-center col-span-3">
B
</div>
<div
class="bg-indigo-500 text-white p-4 font-bold text-center col-start-1 col-end-3"
>
C
</div>
<div
class="bg-indigo-500 text-white p-4 font-bold text-center col-start-3 col-end-6"
>
D
</div>
<div
class="bg-indigo-500 text-white p-4 font-bold text-center col-start-1 col-span-full"
>
E
</div>
</div>
</div>

Preview

A

B

C

D

E

How to Use

Add the col-span-full class directly to your HTML element:

html
<div class="col-span-full">
<!-- Your content here -->
</div>

Responsive Usage

Use Tailwind's responsive prefixes to apply col-span-full at specific breakpoints:

html
<div class="sm:col-span-full md:col-span-full lg:col-span-full">
Responsive element
</div>
  • sm:col-span-full — applies from 640px and up
  • md:col-span-full — applies from 768px and up
  • lg:col-span-full — applies from 1024px and up

Customization

You can extend or override this utility in your tailwind.config.js. See the Tailwind CSS documentation for details on customizing your theme.

Windframe is an AI visual editor for rapidly building stunning web UIs & websites

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates