Logo

Advanced CSS Layout Generator

Visual CSS Grid & Flexbox builder — responsive code, SCSS, Tailwind, and more

Breakpoint

Presets

Grid Settings — desktop

Items (6)

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6

Live Preview — desktop

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
💡 Click items to select & configure position🎯 Each breakpoint can have unique positioning

Generated Code

/* Desktop (Default) */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  grid-auto-rows: minmax(150px, auto);
}

/* Tablet */
@media (max-width: 1024px) {
  .grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    grid-auto-rows: minmax(120px, auto);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    grid-auto-rows: minmax(100px, auto);
  }
}

Implementation Guide

  • • Copy the code above and paste into your stylesheet
  • • Add class grid-container to your container element
  • • The layout responds automatically to screen size changes

HTML Example

<div class="grid-container">
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</div>
  <div>Item 4</div>
  <div>Item 5</div>
  <div>Item 6</div>
</div>

Pro Tips

fr units: 1fr = one fraction of free space. repeat(3,1fr) = 3 equal columns.
auto-fit magic: repeat(auto-fit,minmax(250px,1fr)) creates a fully responsive grid — no media queries needed.
Spanning items: Use grid-column: span 2 or column-start: 1; column-end: 3 to make cells span multiple tracks.
SCSS nesting: The SCSS output uses nested @media for cleaner, more maintainable code with CSS custom properties.
align vs justify: In grid: align = block axis (vertical), justify = inline axis (horizontal).
minmax(): minmax(min,max) = column is at least min, at most max. Combine with auto-fit for zero-query responsive layouts.
Advertisement
Logo

Your all-in-one digital toolkit with 100+ free online tools. Fast, secure, and always available when you need them.

Secure & Private

All processing happens locally in your browser

Mobile Friendly

Works perfectly on all devices and screen sizes

Always Free

No registration, no limits, completely free to use

100+
Free Tools
50K+
Daily Users
1M+
Tools Used
150+
Countries
© 2026 OmniWebKit. All rights reserved.
Made withfor developers and creators