Learn CSS: Grid (CSS Grid Essentials)


#1

Good day guys , i have an enquiry regarding Exercise 6 of Learn CSS: Grid (CSS Grid Essentials)
I would appreciate your help alot.

Here is the link : https://www.codecademy.com/courses/learn-css-grid/lessons/css-grid-i/exercises/fraction?action=resume_content_item&course_redirect=learn-css

Instructions
Change your rows so that each row will take up the exact same fraction of the available space.

Question1: Why doesn’t 2fr 2fr 2fr work? Doesn’t it produce the same results as 1fr 1fr 1fr?


Learn CSS: Grid (CSS Grid Essentials)
#2

Hi there,
By using 1fr 1fr 1fr, each rows/child element will take one-third space of the width of the parent element .grid.
Each row will have the width of 400/3px;
Reply if it helps you.


#3

There are not six rows but three. 1fr makes logical sense, so would be the one to use (and it is what the lesson checker expects, according to the message).


#4

By using 2fr 2fr 2fr each row/child element will take up two-sixth space of the width of the parent element.
Each row will have the width of [(400/6) x 2], which again gives us the same results, hence my initial question.


#5

Hi,
Note that there are three rows, not six


#6

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