PNLdev
Tutorial
Front-end
HTML
reference
CSS
reference
JavaScript
reference
En
English
فارسی
En
English
فارسی
Tutorial
Front-end
HTML
reference
CSS
reference
JavaScript
reference
Run
<!DOCTYPE html> <html> <head> <style> .grid-container { border: 3px solid green; background-color: mintcream; display: grid; grid-template-columns: auto auto auto; gap: 60px; } .grid-container > div { border: 3px solid red; background-color: lightblue; } </style> </head> <body> <h1>gap property example</h1> <p>Use the <em>gap</em> property to specify the size of the gap between the rows and the columns.</p> <p>This grid has a 60px gap between the rows and between the columns:</p> <div class="grid-container"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> </div> </body> </html>