search results:

    • Standard
    • React
    Pricing Learn Community
    • + D
    • Light
    • Dark
    • System
    logo TW Elements
    • Getting started
      • Quick start
      • Tutorials
      • Design system
      • Local installation
      • Optimization
      • Dark mode
      • Theming
      • Changelog
      • Migrating to v2
      • Internationalization guide
      • Class customization
      • Icons Integration
    • CommercialNew
      • Pricing
      • License
      • Installation
      • Git & repository
      • Premium Support
    • Integrations
      • Angular
      • ASP.NET
      • Django
      • Express
      • Laravel
      • Next
      • Nuxt
      • Qwik
      • React
      • Remix
      • Solid
      • Svelte
      • SvelteKit
      • Vue
    • Content & styles
      • Animations
      • Animations Extended
      • Colors
      • Dividers
      • Figures
      • Headings
      • Hover effects
      • Icons
      • Images
      • Mask
      • Shadows
      • Typography
    • Navigation
      • Breadcrumbs
      • Footer
      • Headers
      • Mega menu
      • Navbar
      • Offcanvas
      • Pagination
      • Pills
      • Scrollspy
      • Sidenav
      • Tabs
    • Components
      • Accordion
      • Alerts
      • Avatar
      • Badges
      • Button group
      • Buttons
      • Cards
      • Carousel
      • Chips
      • Collapse
      • Dropdown
      • Gallery
      • Jumbotron
      • Lightbox
      • Link
      • List group
      • Modal
      • Notifications
      • Paragraphs
      • Placeholders
      • Popconfirm
      • Popover
      • Progress
      • Rating
      • Scroll back to top button
      • Social buttons
      • Spinners
      • Stepper
      • Testimonials
      • Timeline
      • Toast
      • Tooltip
      • Video
      • Video carousel
    • Forms
      • Autocomplete
      • Checkbox
      • Datepicker
      • Datetimepicker
      • File input
      • Form templates
      • Input Group
      • Inputs
      • Login form
      • Multi range slider
      • Radio
      • Range
      • Registration form
      • Search
      • Select
      • Switch
      • Textarea
      • Timepicker
      • Validation
    • Data
      • Charts
      • Charts advanced
      • Datatables
      • Tables
    • Methods
      • Clipboard
      • Infinite scroll
      • Lazy loading
      • Loading management
      • Ripple
      • Scrollbar
      • Smooth scroll
      • Sticky
      • Touch
    • Design Blocks
      • Admin Charts
      • Admin Complex
      • Admin Forms
      • Admin Maps
      • Admin Navigation
      • Admin tables
      • Banners
      • Contact
      • Content
      • CTA
      • FAQ
      • Features
      • Headers
      • Hero / Intro sections
      • Logo clouds
      • Mega menu
      • News
      • Newsletter
      • Pricing
      • Projects
      • Stats
      • Stats admin
      • Team
      • Testimonials
    • Tools
      • Button generator
      • Card generator
      • Flexbox generator
      • Footer generator
      • Form builder
      • Grid generator
      • Icon generator
      • Instagram Filters generator
      • Logo generator
      • Table generator
      • Typography generator
    • Coming Soon
      • Angular
      • Builder
      • Templates
      • Vue
    • Resources
      • Playground
      • YouTube Channel
      • Private FB Group
      • Newsletter
      • UI Design course New
      • UI / UX tips
    • Overview
    • CARDS

    Grid span

    Tailwind CSS Grid span

    Use responsive grid span utilities with TW elements. Learn how to control how elements are sized and placed across grid columns and rows.


    Spanning columns

    Use the .col-span-{n} class to make an element span n columns.

    01
    02
    03
    04
    05
    06
    07
    • HTML
            
                
            <div class="grid grid-cols-3 gap-4">
              <div class="...">01</div>
              <div class="...">02</div>
              <div class="...">03</div>
              <div class="... col-span-2">04</div>
              <div class="...">05</div>
              <div class="...">06</div>
              <div class="... col-span-2">07</div>
            </div>
            
            
        
    logo

    Need even more robust tables? Try Data Den.


    • Quick customization & hyper-focus on data management
    • Easily integrate it with any project (not only MDB)
    • Column Pinning, Drag&Drop Columns, Advanced Filtering & much more

    For enterprise projects & users seeking advanced data controls. Tailor your data your way.

    get early access explore

    Column starting and ending lines

    Use the .col-start-{n} and .col-end-{n} classes 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.

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

    Spanning rows

    Use the .row-span-{n} class to make an element span n rows.

    01
    02
    03
    • HTML
            
                
            <div class="grid grid-flow-col grid-rows-3 gap-4">
              <div class="... row-span-3">01</div>
              <div class="... col-span-2">02</div>
              <div class="... col-span-2 row-span-2">03</div>
            </div>
            
            
        

    Row starting and ending lines

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

    Note that CSS grid lines start at 1, not 0, so a full-height element in a 3-row grid would start at line 1 and end at line 4.

    01
    02
    03
    • HTML
            
                
            <div class="grid grid-flow-col grid-rows-3 gap-4">
              <div class="... row-span-2 row-start-2">01</div>
              <div class="... row-span-3 row-end-4">02</div>
              <div class="... row-span-2 row-start-1">03</div>
            </div>
            
            
        

    Related resources

    2 columns layout Borders Breakpoints Center grid items Columns Flexbox Grid columns Grid gap Grid size Grid column size

    If you are looking for more advanced options, try grid system from MDBootstrap.

    • Spanning columns
    • Column starting and ending lines
    • Spanning rows
    • Row starting and ending lines
    • Related resources
    Get useful tips & free resources directly to your inbox along with exclusive subscriber-only content.
    Join our mailing list now
    © 2024 Copyright: MDBootstrap.com

    Access restricted

    To view this section you must have an active PRO account

    Log in to your account or purchase an TWE subscription if you don't have one.

    Buy TWE PRO