Grid Column Start / End

    Utilities for controlling how elements are sized and placed across grid columns.

    Show all classes

    Use the utilities to make an element span n columns.

    Starting and ending lines

    Use the col-start-{n} and col-end-{n} utilities to make an element start or end at the nth grid line. These can also be combined with the col-span-{n} utilities to span a specific number of columns.

    Note that CSS grid lines start at 1, not 0, so a full-width element in a 6-column grid would start at line 1 and end at line 7.

    1. <div class="grid grid-cols-6 gap-4">
    2. <div class="col-start-1 col-end-3 ...">02</div>
    3. <div class="col-end-7 col-span-2 ...">03</div>
    4. <div class="col-start-1 col-end-7 ...">04</div>
    5. </div>

    Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:col-span-6 to only apply the col-span-6 utility on hover.

    For a complete list of all available state modifiers, check out the Hover, Focus, & Other States documentation.

    Breakpoints and media queries

    You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:col-span-6 to apply the col-span-6 utility at only medium screen sizes and above.

    1. <div class="col-span-2 md:col-span-6">
    2. <!-- ... -->

    To learn more, check out the documentation on Responsive Design, and other media query modifiers.


    By default, Tailwind includes grid-column utilities for working with grids with up to 12 columns. You change, add, or remove these by customizing the gridColumn, gridColumnStart, and gridColumnEnd sections of your Tailwind theme config.

    For creating more col-{value} utilities that control the grid-column shorthand property directly, customize the gridColumn section of your Tailwind theme config:

    We use this internally for our col-span-{n} utilities. Note that since this configures the grid-column shorthand property directly, we include the word span directly in the value name, it’s not baked into the class name automatically. That means you are free to add entries that do whatever you want here — they don’t just have to be span utilities.

    To add new col-start-{n} utilities, use the gridColumnStart section of your Tailwind theme config:

    tailwind.config.js

    1. module.exports = {
    2. theme: {
    3. extend: {
    4. '14': '14',
    5. '15': '15',
    6. '16': '16',
    7. '17': '17',
    8. }
    9. }
    10. }
    11. }

    To add new col-end-{n} utilities, use the gridColumnEnd section of your Tailwind theme config:

    tailwind.config.js

    Learn more about customizing the default theme in the documentation.

    Arbitrary values

    1. <div class="col-[16_/_span_16]">
    2. <!-- ... -->
    3. </div>

    Learn more about arbitrary value support in the documentation.