scrimba
Frontend Career Path
Responsive design
Build a Responsive Layout with CSS Grid
Convert to grid template areas
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Convert to grid template areas
AboutCommentsNotes
Convert to grid template areas
Expand for more info
index.css
run
preview
console
html, body {
margin: 0;
padding: 0;
font-family: 'Manrope', sans-serif;
}

body {
margin: 1em;
}

/* =================
Layout
================= */

/*
Challenge 1:
1. Assign each card a grid-area name.
*/

.technology {
}

.environment {
}

.nasa {
}

.physics {
}

.health {
}

/*
Challenge 2:
1. Use grid-template-areas to define
the layout at each size.
(Keep the existing column templates.)
*/

main {
display: grid;
gap: 1em;
grid-template-columns: 1fr;
}

@media (min-width: 500px) {
main {
grid-template-columns: 1fr 1fr;
}
}

@media (min-width: 870px) {
main {
grid-template-columns: repeat(12, 1fr)
}
}

/* =================
Article Card
================= */

a:hover, a:focus {
filter: brightness(0.9);
}

a:focus {
outline: 3px solid #5a5a5a;
box-shadow: 0 0 0 3px rgba(135,18,113,0.5);
transition: outline 0.2s ease, box-shadow 0.2s ease;
}

article {
border-radius: 0.2em;
background-color: #e5e5e5;
height: 100%;
}

.article-header {
box-sizing: border-box;
padding: 1em;
width: 100%;
}


/* =================
Typography
================= */

h1 {
color: #0F0F0F;
letter-spacing: 0.04em;
font-family: "Source Code Pro", sans-serif;
margin: 0;
padding: 0;
}

a {
text-decoration: none;
}

h2 {
font-size: 0.88rem;
color: #5D0E50;
margin: 0;
letter-spacing: 0.065em;
text-transform: uppercase;
}

h3 {
font-size: 1rem;
margin: .4em 0;
letter-spacing: 0.03em;
color: #111111;
font-weight: 500;
}

p {
margin: 0;
font-size: .85rem;
color: #7c7c7c;
}

/* =================
Images
================= */

img {
width: 100%;
border-top-left-radius: .2em;
border-top-right-radius: .2em;
}
Console
/index.html
-5:54