Tell us what’s happening:
Tests 13-16 are failing (grid-template-areas), but in preview it seems to work fine. What issue did I miss?
I already read similar topics in forum, but still don’t get the problem.
Your code so far
<!-- file: index.html -->
'''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Newspaper Layout</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="left-div"></div>
<main class="newspaper-layout">
<header class="title">
<h1>Newspaper name</h1>
</header>
<article class="feature-article">
<h2>What is Lorem ipsum?</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</article>
<article class="secondary-article">
<h2>Where does it come from?</h2>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
</article>
<figure class="cover-image">
<img src="https://placehold.co/200x400" alt="Placeholder image" loading="lazy">
</figure>
<article class="small-article1">
<h3>Small article 1</h3>
<p class="small-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vulputate, velit mattis molestie vulputate, quam sapien rhoncus ligula, vitae accumsan turpis tellus in mauris. Maecenas vehicula tortor felis, vestibulum eleifend felis ornare vel.</p>
</article>
<article class="small-article2">
<h3>Small article 2</h3>
<p class="small-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vulputate, velit mattis molestie vulputate, quam sapien rhoncus ligula, vitae accumsan turpis tellus in mauris. Maecenas vehicula tortor felis, vestibulum eleifend felis ornare vel.</p>
</article>
<article class="small-article3">
<h3>Small article 3</h3>
<p class="small-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vulputate, velit mattis molestie vulputate, quam sapien rhoncus ligula, vitae accumsan turpis tellus in mauris. Maecenas vehicula tortor felis, vestibulum eleifend felis ornare vel.</p>
</article>
</main>
<div class="right-div"></div>
</body>
</html>
'''
/* file: styles.css */
'''
*, *::before, *::after {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html {
font-size: 62.5%;
}
body {
display: grid;
grid-template-columns: minmax(2rem, 1fr) minmax(min-content, 94rem) minmax(2rem, 1fr);
}
.newspaper-layout {
display: grid;
grid-template-areas:
"title title title"
"feature-article feature-article cover-image"
"secondary-article secondary-article cover-image"
"small-article1 small-article2 small-article3";
grid-template-columns: repeat(3, 1fr);
grid-template-rows: auto 1fr 1fr 1fr;
gap: 3rem 2rem;
}
.title {
font-family: serif;
font-size: 3rem;
text-align: center;
margin: 20px 0;
grid-area: title;
}
.feature-article {
grid-area: feature-article;
}
.secondary-article {
grid-area: secondary-article;
}
h2 {
font-size: 2.4rem;
margin-bottom: 1rem;
}
p {
font-size: 1.6rem;
font-family: sans-serif;
}
.cover-image {
grid-area: cover-image;
display: flex;
justify-content: center;
align-items: center;
}
img {
max-width: 100%;
}
.small-article1 {
grid-area: small-article1;
background-color: rgba(220, 220, 220, 40%);
padding: 1.5rem;
border-radius: 1.5rem;
}
.small-article2 {
grid-area: small-article2;
background-color: rgba(220, 220, 220, 40%);
padding: 1.5rem;
border-radius: 1.5rem;
}
.small-article3 {
grid-area: small-article3;
background-color: rgba(220, 220, 220, 40%);
padding: 1.5rem;
border-radius: 1.5rem;
}
h3 {
font-size: 2rem;
margin-bottom: 1rem;
}
.small-text {
font-size: 1.4rem;
}
@media only screen and (max-width: 700px) {
.newspaper-layout {
display: grid;
grid-template-areas:
'title title title'
'feature-article feature-article cover-image'
'secondary-article secondary-article secondary-article'
'small-article1 small-article2 small-article3';
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto min-content min-content 1fr;
gap: 3rem 2rem;
}
.title {
font-size: 2.6rem;
}
}
@media only screen and (max-width: 500px) {
.newspaper-layout {
display: grid;
grid-template-areas:
'title'
'feature-article'
'cover-image'
'secondary-article'
'small-article1'
'small-article2'
'small-article3';
grid-template-columns: 1fr;
gap: 3rem;
}
.title {
font-size: 2.2rem;
}
h2 {
font-size: 2rem;
}
h3 {
font-size: 1.8rem;
}
p {
font-size: 1.4rem;
}
}
'''
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Challenge Information:
Design a Newspaper Layout - Design a Newspaper Layout