<!DOCTYPE html> <html> <head> <style> #grid{ display: grid; height:250px; grid-template-rows: 50px 200px min-content; background-color:lightgreen; } #item1{ min-height:80px; grid-row:3/4; background-color:lightgray; } </style> </head> <body> <div id="grid"> <div id="item1">item1</div> </div> </body> </html>
Run
×
Share