FAQ: Advanced CSS Grid - Justify Items

Community%20FAQs%20on%20Codecademy%20Exercises

This community-built FAQ covers the “Justify Items” exercise from the lesson “Advanced CSS Grid”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn CSS

FAQs on the exercise Justify Items

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

what is the difference between “justify-content” and "justify-item " commands?

I set the width for .recipe to 200px, then I used the (justify-item:end) for .main but there wasn’t any change for the main?

Add an ‘s’ to the end of ‘item’: justify-items: end;

the difference is barely justify-items: end; vs visible justify-items: center;
check out the image

3 Likes

I hope that I’m understanding this correctly in which I am not giving out misinformation.

First off, the class .recipe has a width of 200px. The grid-template-columns have width 250px. So “justify-item” shifts the “.recipe” left and right within the 250px columns.

Next, “justify-content” moves the entire column across the page along the row axis. It moves the entire 250px box instead of just the item within the column.

2 Likes

Is worthwhile to study Flexbox and Pseudo classes, elements, selector CSS?
They are not obsolete? If not what are some benefits?

I’m still learning myself and although Flexbox and Grids are similar they do have their differences. It’s worth learning them all as you may need a slightly different tool as a solution to a problem…