<!DOCTYPE html> <html> <head> <style> #grid{ display: grid; height:250px; grid-template-rows: 20% 1fr min-content; background-color:lightgreen; } #item1{ grid-row: 3/4; background-color:red; } </style> </head> <body> <div id="grid"> <div id="item1"> <p>Grid item.</p> <p>Grid item.</p> </div> </div> </body> </html>
Run
×
Share