Last active
January 28, 2020 12:53
-
-
Save zocom-christoffer-wallenberg/20c2cf1f6357b35100d41182fd227d79 to your computer and use it in GitHub Desktop.
A grid with grid-areas auto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="style.css"> | |
<title>Chat</title> | |
</head> | |
<body> | |
<div class="grid-container"> | |
<header class="header"></header> | |
<main class="main"> | |
<h1>Hello</h1> | |
<p>Hej</p> | |
<p>Hej</p> | |
<p>Hej</p> | |
<p>Hej</p> | |
<p>Hej</p> | |
<p>Hej</p> | |
</main> | |
<aside class="aside"></aside> | |
</div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": [], | |
"styles": [] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.grid-container { | |
max-width: 1000px; | |
display: grid; | |
grid-template-columns: repeat(6, 1fr); | |
grid-auto-rows: 100px auto; | |
grid-template-areas: "header header header header header header" | |
"main main main main aside aside"; | |
} | |
.header { | |
grid-area: header; | |
border: 1px solid #000000; | |
} | |
.main { | |
grid-area: main; | |
border: 1px solid #000000; | |
} | |
.aside { | |
grid-area: aside; | |
border: 1px solid #000000; | |
background: #93f; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment