<!DOCTYPE html> <html> <head> <style> #grid{ display: grid; grid-template-rows: repeat(3, 20px 30px 40px); background-color:lightgreen; } #item1{ grid-row: 8/9; background-color:lightblue; } </style> </head> <body> <div id="grid"> <div id="item1"> <p>This paragraph occupies 30px height of the row.</p> </div> </div> </body> </html>
Run
×
Share