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

Level 15 lesson 6 order value not accepted

Even after the value for order-negative is given as -1 and value 2 for order-last, the compiler states that "
Use the order property for the class order-negative with the right value." after clicking on the submit .

code used:
<!DOCTYPE html>
<html>
<head>
<title>CSS Flex Flow</title>
<style>
.flex-container{
background-color: #4535AA;
padding: 10px;
display: flex;
flex-flow: row wrap;
}
.flex-item{
background-color: white;
margin: 20px;
padding: 20px;
width: 200px;
}

.order-negative {
order: <-1>;
background-color: #FFB643;
}

.order-last {
order: <2>
background-color: #ED639E;
}
</style>
</head>
<body>
<div class="flex-container">
<div class="flex-item order-last">Item 1</div>
<div class="flex-item">Item 2</div>
<div class="flex-item">Item 3</div>
<div class="flex-item">Item 4</div>
<div class="flex-item">Item 5</div>
<div class="flex-item">Item 6</div>
<div class="flex-item order-negative">Item 7</div>
<div class="flex-item">Item 8</div>
</div>
</body>
</html>
by

1 Answer

sam5epi0l
Hi, Remove the angle brackets enclosing value of order property, Like the code below:

<!DOCTYPE html>
<html>
<head>
<title>CSS Flex Flow</title>
<style>
.flex-container{
background-color: #4535AA;
padding: 10px;
display: flex;
flex-flow: row wrap;
}
.flex-item{
background-color: white;
margin: 20px;
padding: 20px;
width: 200px;
}

.order-negative {
order:-1;
background-color:#FFB643;

}

.order-last {
background-color:#ED639E;
order:2;

}
</style>
</head>
<body>
<div class="flex-container">
<div class="flex-item order-last">Item 1</div>
<div class="flex-item">Item 2</div>
<div class="flex-item">Item 3</div>
<div class="flex-item">Item 4</div>
<div class="flex-item">Item 5</div>
<div class="flex-item">Item 6</div>
<div class="flex-item order-negative">Item 7</div>
<div class="flex-item">Item 8</div>
</div>
</body>
</html>

Login / Signup to Answer the Question.