Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Level 26. Making 5 rows. #66

Open
asaltenis opened this issue Jan 31, 2018 · 36 comments
Open

Level 26. Making 5 rows. #66

asaltenis opened this issue Jan 31, 2018 · 36 comments

Comments

@asaltenis
Copy link

The challange description says, that I should make 5 rows using grid-template-rows.

grid-template-rows works much the same as grid-template-columns.

Use grid-template-rows to water all but the top 50 pixels of your garden. Note that the water is set to fill only your 5th row, so you'll need to create 5 rows in total.

I made it, but it doesn't work. Here is my line of code:
grid-template-rows: repeat(4, 10px) 1fr;

And it shows, how, I think, it should look like:

paveikslas

@thomaspark
Copy link
Owner

You almost have the solution except you've left 40px of space up top instead of 50px.

@DarrellBrogdon
Copy link

This issue highlights the needs for hints in the game. I couldn't figure out the answer to this level either until I found this issue.

@yofriadi
Copy link

repeat(4, 12.5px) 1fr;
thank me later

@SpyrosKo
Copy link

You could also do:
grid-template-rows: 12.5px 12.5px 12.5px 12.5px;

@cnscorpions
Copy link

grid-template-rows: 50px 0 0 0; works

@koenknol
Copy link

Why is this solution not accepted?

 grid-template-rows: 50px 1fr 1fr 1fr 100%;

@JoeRoddy
Copy link

JoeRoddy commented Jun 3, 2019

I kind of agree that this one was a bit vague. I solved it with
grid-template-rows: 50px 0 0 0 100%;
but it wasn't accepted.

Awesome project by the way, thanks for making this Thomas!

@korenes
Copy link

korenes commented Aug 9, 2019

it has to be an error because it says the water should only fill the 5th row

@artlili
Copy link

artlili commented Aug 28, 2019

grid-template-rows: 50px 0 0 0 1fr;

@jothamardel
Copy link

I don't understand after spending hours trying to find a solution, I came up with this:
grid-template-rows: repeat(2, 0%)25px 25px;

@rabindranathforcast
Copy link

@yofriadi how you get that? did you make some calculation? any explain? o just testing the mesure?

repeat(4, 12.5px) 1fr;
thank me later

@cazroam
Copy link

cazroam commented Mar 4, 2020

@rabindranathforcast

4 x 12.5px = 50px (takes care of the 50px gap at the top and uses 4 rows)
1fr (fills the rest of the space and uses 1 row)
--> the above equates to 5 rows.

I was stuck too on this one. The explanation is a bit cryptic but now I see the solution, it's clearer.

@herzorf
Copy link

herzorf commented Apr 2, 2020

this is my ansower: grid-template-rows: repeat(4,12.5px) 1fr;

@kumar-vipin
Copy link

This can be handled with various combinations
This is my answer:
grid-template-rows: 20px repeat(3, 10px) 1fr;
20px for first row + 10px for next 3 row = 50 px for 1st four rows
1fr will take remaining space

@haroldao
Copy link

repeat(4, 12.5px) 1fr;
thank me later

Thanks :)

codams pushed a commit to codams/gridgarden that referenced this issue Nov 25, 2020
Hi,
I found the lvl 26 hard to understand and many people had an issue with it 
- thomaspark#73
- thomaspark#23
- thomaspark#66
I think adding emphasis on the last row to make it clearer that others must stay empty may be enough for everyone to understand better what we should do.
@ValiNicula
Copy link

ValiNicula commented May 11, 2021

Mine was : grid-template-rows: 50px 0 0 0 :)

@interglobalmedia
Copy link

However, 1fr is not even needed at the end. It is solved with:

grid-template-rows: repeat(4, 12.5px);

@juanluischaurant
Copy link

I think the difficulty lies here:

you'll need to create 5 rows in total.

One must interpret the question properly (5 rows are needed). Then the answer is straightforward.

50px 0 0 0 1fr

Which means:

1st column: 50px
2nd: 0px
3rd: 0px
4th: 0px
5th: 1fr (take all the remaining space)

The water is set to fill the fifth column, so... All the carrots in the 5th column and the water filling this same column

@BorisGaliano
Copy link

the answer is grid-template-rows:repeat(4, 12.5px) 1fr

@Klemart3D
Copy link

Also: grid-template-rows: 50px repeat(3, 0) 1fr;

@perman03
Copy link

perman03 commented Feb 16, 2022

I just did this exercise and ran into the same problem. I came here and found the solution.
grid-template-rows: repeat(4, 12.5px) 1fr;
It is very strange, because supposedly it is as they say in another comment. But I also accept this. (?
grid-template-rows: 12.5px 12.5px 12.5px 12.5px;

@Umang-Vadadoriya
Copy link

The challange description says, that I should make 5 rows using grid-template-rows.

grid-template-rows works much the same as grid-template-columns.
Use grid-template-rows to water all but the top 50 pixels of your garden. Note that the water is set to fill only your 5th row, so you'll need to create 5 rows in total.

I made it, but it doesn't work. Here is my line of code: grid-template-rows: repeat(4, 10px) 1fr;

And it shows, how, I think, it should look like:

paveikslas

image

@MatataLeon
Copy link

my answer --- grid-template-rows: 50px repeat(3, 0) auto;

@Alhajideen
Copy link

grid-template-rows: 12.5px 12.5px 12.5px 12.5px 1fr;
This also works

@jdx-code
Copy link

This also works grid-template-rows: 50px 0 0 0;

@jdx-code
Copy link

I think the difficulty lies here:

you'll need to create 5 rows in total.

One must interpret the question properly (5 rows are needed). Then the answer is straightforward.

50px 0 0 0 1fr

Which means:

1st column: 50px 2nd: 0px 3rd: 0px 4th: 0px 5th: 1fr (take all the remaining space)

The water is set to fill the fifth column, so... All the carrots in the 5th column and the water filling this same column

It's a great answer. but I noticed it also works without the 1fr in the end.

@juanluischaurant
Copy link

I think the difficulty lies here:
you'll need to create 5 rows in total.
One must interpret the question properly (5 rows are needed). Then the answer is straightforward.
50px 0 0 0 1fr
Which means:
1st column: 50px 2nd: 0px 3rd: 0px 4th: 0px 5th: 1fr (take all the remaining space)
The water is set to fill the fifth column, so... All the carrots in the 5th column and the water filling this same column

It's a great answer. but I noticed it also works without the 1fr in the end.

Great catch!

@watarikai96
Copy link

grid-template-rows: 50px repeat(3, 0px);

@Thaleia
Copy link

Thaleia commented Mar 2, 2023

There need to be 5 rows - this is defacto.

So, the first "area" is to be of 50px.

The last area will be 1fr to water the whole carrot row length.

The first unwatered 50px can be done in various ways, as long as it takes 4 rows of any size, since it excludes the last area of 1fr as mentioned above.

Solution:
grid-template-rows: repeat(2, 0%) 25px 25px 1fr;
grid-template-rows: repeat(2, 0px) repeat(2, 25px) 1fr;

:))

@AbhishekAnand2
Copy link

Here's the best possible answer:

grid-template-rows: repeat(3, 10px) 20px 1fr;

@finsoncoutinho
Copy link

Here's mine:
grid-template-rows:50px 0px 0px 0px 1fr ;

Screenshot 2023-06-29 at 4 07 27 PM

@juanluischaurant
Copy link

Here's mine: grid-template-rows:50px 0px 0px 0px 1fr ;

Screenshot 2023-06-29 at 4 07 27 PM

image

Just replaced 0px 0px 0px with repeat(3, 0px). Great solution!

@Vipin-V
Copy link

Vipin-V commented Aug 2, 2023

grid-template-rows: 50px repeat(3, 0);

@viveklearning
Copy link

The challange description says, that I should make 5 rows using grid-template-rows.

grid-template-rows works much the same as grid-template-columns.
Use grid-template-rows to water all but the top 50 pixels of your garden. Note that the water is set to fill only your 5th row, so you'll need to create 5 rows in total.

I made it, but it doesn't work. Here is my line of code: grid-template-rows: repeat(4, 10px) 1fr;

And it shows, how, I think, it should look like:

paveikslas

grid-template-rows: repeat(4,12.5px) 1fr;

@0xLida00
Copy link

The challange description says, that I should make 5 rows using grid-template-rows.

grid-template-rows works much the same as grid-template-columns.
Use grid-template-rows to water all but the top 50 pixels of your garden. Note that the water is set to fill only your 5th row, so you'll need to create 5 rows in total.

I made it, but it doesn't work. Here is my line of code: grid-template-rows: repeat(4, 10px) 1fr;

And it shows, how, I think, it should look like:

paveikslas

Useful Thread - solved it with:
grid-template-rows: 12.5px 12.5px 12.5px 12.5px 1fr;

@PuertoPounder
Copy link

repeat(4, 12.5px) 1fr; thank me later

Thanks for the help. Was having trouble with this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests