Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How to pass level 16 lesson 4

<!DOCTYPE html>
<html>
<head>
<title>CSS Grid Item Placement</title>
<style>
.grid {
display: grid;
background-color: #d6d1f5;
padding: 20px;
grid-template-columns: [start] auto [line2] auto [line3] auto [end];
}
.item {
background-color: #E7E4F8;
border: 1px solid black;
padding: 20px;
text-align: center;
}
.item-x {
background-color: #ED639E;
grid-column-start:2;
grid-colum-end:3;
grid-row-start:2;
grid-row-end: span 2;


}
</style>
</head>
<body>
<div class="grid">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item item-x">4</div>
<div class="item">5</div>
<div class="item">6</div>
<div class="item">7</div>
<div class="item">8</div>
<div class="item">9</div>
</div>
</body>
</html>
please tell me what's wrong with this code for that lesson?
by

6 Answers

abdel-rahman
If you are already at level 16 lesson 4. Can you, please, help me with level 14 lesson 9.
Tanyakat2j
Sorry i don't remember the question
kshitijrana14
Try this one

<!DOCTYPE html>
<html>
<head>
<title>CSS Grid Item Placement</title>
<style>
.grid {
display: grid;
background-color: #d6d1f5;
padding: 20px;
grid-template-columns: [start] auto [line2] auto [line3] auto [end];
}
.item {
background-color: #E7E4F8;
border: 1px solid black;
padding: 20px;
text-align: center;
}
.item-x {
background-color: #ED639E;
grid-column-start: 2;
grid-column-end: 3;
grid-row-start: 2;
grid-row-end: span 2;
}
</style>
</head>
<body>
<div class="grid">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item item-x">4</div>
<div class="item">5</div>
<div class="item">6</div>
<div class="item">7</div>
<div class="item">8</div>
<div class="item">9</div>
</div>
</body>
</html>
Tanyakat2j
i am still getting an error ,its telling me to use the grid-column-start property with correct value
abdel-rahman
<!DOCTYPE html>
<html>
<head>
<title>CSS Grid Item Placement</title>
<style>
.grid {
display: grid;
background-color: #d6d1f5;
padding: 20px;
grid-template-columns: [start] auto [line2] auto [line3] auto [end];
}
.item {
background-color: #E7E4F8;
border: 1px solid black;
padding: 20px;
text-align: center;
}
.item-x {
background-color: #ED639E;
grid-column-start: line2;
grid-column-end: line3;
grid-row-start: 2;
grid-row-end: span 2;
}
</style>
</head>
<body>
<div class="grid">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item item-x">4</div>
<div class="item">5</div>
<div class="item">6</div>
<div class="item">7</div>
<div class="item">8</div>
<div class="item">9</div>
</div>
</body>
</html>
Tanyakat2j
Thank you@abdel-rahman

Login / Signup to Answer the Question.