<!DOCTYPE html> <html> <head> <style> #grid{ display: grid; grid-template-rows: 20px auto 70px; background-color:lightgreen; } #item1{ grid-row: 2/3; background-color:lightblue; } </style> </head> <body> <div id="grid"> <div id="item1">item1 (Remaining space after filling 140px height)</div> </div> </body> </html>
Run
×
Share