<!DOCTYPE html> <html> <head> <style> #grid{ display:grid; height:250px; grid-template-rows: 90px 1fr 80px; background-color:lightgreen; } #item1{ grid-row: 2/4; /* from grid line 2 to 4 */ background-color:lightblue; } </style> </head> <body> <div id="grid"> <div id="item1">item1</div> </div> </body> </html>
Run
×
Share