I've got a grid layout with 2 columns and 3 rows.
I want to be able to resize the column widths. I know I can use resize: horizontal but that only changes width for one row.
I'm thinking I can't do what I want and I'll need to use nested grids but I'm not sure so I wanted to check.
<!DOCTYPE html>
<html>
<head>
<style>
.container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
gap: 0px 0px;
grid-auto-flow: row;
grid-template-areas:
"logo search"
"nav main"
"log main";
}
.logo {
grid-area: logo;
}
.search {
grid-area: search;
}
.nav {
grid-area: nav;
overflow: auto;
resize: horizontal;
}
.log {
grid-area: log;
overflow: auto;
resize: horizontal;
}
.main {
grid-area: main;
}
html,
body,
.container {
height: 100%;
margin: 0;
}
/* For presentation only, no need to copy the code below */
.container * {
border: 1px solid red;
position: relative;
}
.container *:after {
content: attr(class);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: grid;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<div class="container">
<div class="logo"></div>
<div class="search"></div>
<div class="nav">
</div>
<div class="log"></div>
<div class="main"></div>
</div>
</body>
</html>