CSS grid introduced a new length unit, fr, to create flexible grid tracks. Referring to the code sample below, what will the widths of the three columns be?

Advertisement

.grid {
display: grid;
width: 500px;
grid-template-columns: 50px 1fr 2fr;
}

  • The first column will have a width of 50px. The second column will be 50px wide and the third column will be 100px wide.
  • The first column will have a width of 50px. The second column will be 150px wide and the third column will be 300px wide.
  • The first column will have a width of 50px. The second column will be 300px wide and the third column will be 150px wide.
  • The first column will have a width of 50px. The second column will be 500px wide and the third column will be 1000px wide.
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend