Skip to content

css grid #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ html {
height: 100%;
padding: 16px;
box-sizing: border-box;
display: grid;
gap: 15px;
grid-template-columns: 1fr 3fr;
grid-template-rows: 1fr 1fr 5fr 1fr;
}

.container div {
Expand Down
38 changes: 38 additions & 0 deletions intermediate-html-css/advanced-grid/02-holy-grail-mockup/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

.container {
text-align: center;
display: grid;
gap: 4px;
grid-template-columns: 1fr 4fr;
}

.container div {
Expand All @@ -17,6 +20,9 @@

.header {
background-color: #393f4d;
display: grid;
grid-template-columns: 1fr 2fr;
align-items: center;
}

.menu ul,
Expand All @@ -26,6 +32,9 @@

.sidebar {
background-color: #C50208;
display: grid;
gap: 50px;
grid-row: span 3;
}

.sidebar .photo {
Expand Down Expand Up @@ -55,6 +64,10 @@

.article {
background-color: #bccbde;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
grid-column-start: 2;
}

.article p {
Expand All @@ -68,6 +81,7 @@
background-color: #FFFFFF;
color: black;
text-align: center;
height: 200px;
}

.card p {
Expand All @@ -88,4 +102,28 @@
.footer p {
font-size: 13px;
font-weight: normal;
}

.menu ul,
.nav ul {
list-style: none;
}

.menu ul {
display: grid;
grid-template-columns: repeat(4, 1fr);
}

.nav ul {
display: grid;
grid-template-columns: repeat(3, 1fr);
}

.header,
.footer {
grid-column: span 2;
}

.header .logo {
justify-self: start;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ html {
height: 100%;
padding: 16px;
box-sizing: border-box;
display: grid;
grid-template-columns: 400px 800px;
grid-template-rows: 100px 100px 500px 100px;
gap: 15px;
}

.container div {
Expand All @@ -22,10 +26,12 @@ html {

.header {
background-color: #006157;
grid-column: 1 / 3;
}

.sidebar {
background-color: #005B94;
grid-row: 2 / 4;
}

.nav {
Expand All @@ -38,6 +44,7 @@ html {

.footer {
background-color: #393f4d;
grid-area: 4 / 1 / 5 / 3;
}

.article p {
Expand Down