Last active
January 28, 2020 12:25
-
-
Save zocom-christoffer-wallenberg/318b0c1330e0502a3345b98d6c63c281 to your computer and use it in GitHub Desktop.
a simple grid
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> | |
<main class="grid-container"> | |
<header class="box1"> | |
<nav class="menu"> | |
<a href="#">Hem</a> | |
<a href="#">Om mig</a> | |
<a href="#">Kontakt</a> | |
</nav> | |
</header> | |
<section class="box2"></section> | |
<section class="box3"></section> | |
</main> | |
</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 { | |
display: grid; | |
max-width: 1000px; | |
grid-template-columns: repeat(6, 1fr); | |
grid-template-rows: repeat(4, 120px); | |
} | |
.box1 { | |
border: 1px solid #000000; | |
grid-column: auto / span 6; | |
grid-row: auto / span 1; | |
} | |
.box2 { | |
border: 1px solid #000000; | |
grid-column: auto / span 2; | |
grid-row: auto / span 3; | |
} | |
.box3 { | |
border: 1px solid #000000; | |
grid-column: auto / span 4; | |
grid-row: auto / span 3; | |
} | |
.menu { | |
height: 100%; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
.menu a { | |
margin-left: 1rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment