Grid Gap and Spacing
Control the space between grid items with gap properties.
The gap Property
Add space between all items:
Loading CSS Playground...
row-gap and column-gap
Different gaps for rows and columns:
Loading CSS Playground...
gap Shorthand
Two values: row-gap column-gap
Loading CSS Playground...
No Gap
Compare with and without gap:
Loading CSS Playground...
Interactive Playground
Loading Grid Playground...
Gap with Borders
Gap replaces the need for margin tricks:
Loading CSS Playground...
Practical: Image Gallery
Loading CSS Playground...
Gap Units
You can use any CSS unit:
Loading CSS Playground...
Exercise: Add Gap
Add a 15px gap between grid items:
Loading CSS Exercise...
التالي · الدرس 23 من 27
Grid Areas and Placement
قراءة 3 دقيقة
أنهيت 22 من 27 درسًا

اسأل Byte عن هذا الدرس
محادثة خاصة حول هذا الدرس. قرأ Byte الدرس كاملًا، ويجيب خلال ثوانٍ، ويُظهر القسم الذي تأتي منه كل إجابة. يمكنك السؤال بأي لغة.
الأسئلة والأجوبة
أسئلة عامة حول هذا الدرس. يجيب AI Tutor فورًا بلغتك، ويراجع فريق FreeAcademy الإجابات، ويمكن لكل المتعلمين قراءتها.

