![]() |
More about grids in CSS3 - Printable Version +- QP School (https://qomplainerzschool.lima-city.de) +-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3) +--- Forum: CSS3 Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=5) +--- Thread: More about grids in CSS3 (/showthread.php?tid=5184) |
More about grids in CSS3 - Qomplainerz - 07-26-2023 Description: CSS Grid is a powerful layout system that allows you to create complex two-dimensional grid-based layouts. It enables you to define rows and columns and place items within the grid, providing precise control over the layout of your web pages. Example: <!DOCTYPE html> <html> <head> <title>CSS Grid Example</title> <style> /* Create a 3x3 grid layout */ .grid-container { display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(3, 100px); grid-gap: 10px; } .grid-item { background-color: lightblue; padding: 10px; text-align: center; } </style> </head> <body> <div class="grid-container"> <div class="grid-item">1</div> <div class="grid-item">2</div> <div class="grid-item">3</div> <div class="grid-item">4</div> <div class="grid-item">5</div> <div class="grid-item">6</div> <div class="grid-item">7</div> <div class="grid-item">8</div> <div class="grid-item">9</div> </div> </body> </html> |