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:
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 () 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 () below!
Agree with a comment or answer? 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’:
the difference is barely
justify-items: end; vs
visible justify-items: center;
check out the image
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.
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…
The text states that "by setting the
justify-items property to
center , the
<div> s will be centered inside of their columns. They will only be as wide as necessary to contain their content (the words Card 1, etc). "
It works on the code they provide in the explanation, and I assumed it would work on any code. However, it doesn’t on the one in the exercise: if I don’t specify the width of the
.recipe divs, they span the width of their columns even if I set
center in the
main div. Why is that?