This code will not work, why?

    /* Only change code below this line */

    grid-template-columns: repeat(3, min-max(90px, 1fr));

    /* Only change code above this line */

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
<style>
.item1{background:LightSkyBlue;}
.item2{background:LightSalmon;}
.item3{background:PaleTurquoise;}
.item4{background:LightPink;}
.item5{background:PaleGreen;}

.container {
 font-size: 40px;
 min-height: 300px;
 width: 100%;
 background: LightGray;
 display: grid;
 /* Only change code below this line */

 grid-template-columns: repeat(3, min-max(90px, 1fr));

 /* Only change code above this line */
 grid-template-rows: 1fr 1fr 1fr;
 grid-gap: 10px;
}
</style>

<div class="container">
<div class="item1">1</div>
<div class="item2">2</div>
<div class="item3">3</div>
<div class="item4">4</div>
<div class="item5">5</div>
</div>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Edg/97.0.1072.69

Challenge: Limit Item Size Using the minmax Function

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

It looks like you accidentally submitted your post before you finished asking your question. What’s going on?

1 Like

[quote=“ArielLeslie, post:3, topic:493971”]

[quote=“stardoctor11, post:1, topic:493971”]
Describe your issue in detail here.
[/quote]I submitted this code( which I think is correct) but freecodecamp will not accept it as correct.

Why is this code not being accepted as correct? I have no clue. I read the hint.
I watched the movie. I thought long and hard, but to no avail. Anyone have an Idea why this code is not accepted as correct?[/quote}

Is this the correct function?

What do the failing tests say? What are you trying to accomplish that isn’t working as expected?

1 Like

I submitted what I thought was the correct solution to the exercise, but it keeps rejecting my submission. Do you have an idea why this is so?

Does it do what it is supposed to? What do the failing tests say? I can’t help you figure out why something is wrong unless you tell me what is wrong.

/ running tests

container

class should have a

grid-template-columns

property that is set to repeat 3 columns with the minimum width of

90px

and maximum width of

1fr

. // tests completed That is what it says.

Look very carefully at the challenge description and code example. You did not set the property correctly.

Thank you, ArielLeslie, that did it.

Good job figuring it out! Happy coding.

min-max should be minmax. With out the “-”.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.