GithubHelp home page GithubHelp logo

Level 26. Making 5 rows. about gridgarden HOT 34 OPEN

thomaspark avatar thomaspark commented on May 2, 2024 4
Level 26. Making 5 rows.

from gridgarden.

Comments (34)

yofriadi avatar yofriadi commented on May 2, 2024 96

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

from gridgarden.

cnscorpions avatar cnscorpions commented on May 2, 2024 20

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

from gridgarden.

DarrellBrogdon avatar DarrellBrogdon commented on May 2, 2024 13

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.

from gridgarden.

thomaspark avatar thomaspark commented on May 2, 2024 11

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

from gridgarden.

juanluischaurant avatar juanluischaurant commented on May 2, 2024 8

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

from gridgarden.

SpyrosKo avatar SpyrosKo commented on May 2, 2024 5

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

from gridgarden.

korenes avatar korenes commented on May 2, 2024 5

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

from gridgarden.

artlili avatar artlili commented on May 2, 2024 4

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

from gridgarden.

rabindranathforcast avatar rabindranathforcast commented on May 2, 2024 2

@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

from gridgarden.

finsoncoutinho avatar finsoncoutinho commented on May 2, 2024 2

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

Screenshot 2023-06-29 at 4 07 27 PM

from gridgarden.

jothamardel avatar jothamardel commented on May 2, 2024 1

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;

from gridgarden.

cazroam avatar cazroam commented on May 2, 2024 1

@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.

from gridgarden.

herzorf avatar herzorf commented on May 2, 2024 1

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

from gridgarden.

jdx-code avatar jdx-code commented on May 2, 2024 1

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.

from gridgarden.

juanluischaurant avatar juanluischaurant commented on May 2, 2024 1

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!

from gridgarden.

koenknol avatar koenknol commented on May 2, 2024

Why is this solution not accepted?

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

from gridgarden.

JoeRoddy avatar JoeRoddy commented on May 2, 2024

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!

from gridgarden.

kumar-vipin avatar kumar-vipin commented on May 2, 2024

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

from gridgarden.

haroldao avatar haroldao commented on May 2, 2024

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

Thanks :)

from gridgarden.

ValiNicula avatar ValiNicula commented on May 2, 2024

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

from gridgarden.

interglobalmedia avatar interglobalmedia commented on May 2, 2024

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

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

from gridgarden.

BorisGaliano avatar BorisGaliano commented on May 2, 2024

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

from gridgarden.

Klemart3D avatar Klemart3D commented on May 2, 2024

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

from gridgarden.

perman03 avatar perman03 commented on May 2, 2024

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;

from gridgarden.

Umang-Vadadoriya avatar Umang-Vadadoriya commented on May 2, 2024

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

from gridgarden.

MatataLeon avatar MatataLeon commented on May 2, 2024

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

from gridgarden.

Alhajideen avatar Alhajideen commented on May 2, 2024

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

from gridgarden.

jdx-code avatar jdx-code commented on May 2, 2024

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

from gridgarden.

juanluischaurant avatar juanluischaurant commented on May 2, 2024

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!

from gridgarden.

watarikai96 avatar watarikai96 commented on May 2, 2024

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

from gridgarden.

Thaleia avatar Thaleia commented on May 2, 2024

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;

:))

from gridgarden.

AbhishekAnand2 avatar AbhishekAnand2 commented on May 2, 2024

Here's the best possible answer:

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

from gridgarden.

Vipin-V avatar Vipin-V commented on May 2, 2024

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

from gridgarden.

viveklearning avatar viveklearning commented on May 2, 2024

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;

from gridgarden.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.