Added Hint/Solution to "justify-self" Challenge (#20614)
This commit is contained in:
@ -3,8 +3,22 @@ title: Align an Item Horizontally using justify-self
|
||||
---
|
||||
## Align an Item Horizontally using justify-self
|
||||
|
||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/responsive-web-design/css-grid/align-an-item-horizontally-using-justify-self/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
||||
In this challenge you are required to use the "justify-self" property to horizontally align a grid item.
|
||||
|
||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
||||
### Hint
|
||||
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
You can horizontally align an item by declaring the following in your CSS codeblock:
|
||||
|
||||
````css
|
||||
justify-self: value;
|
||||
````
|
||||
|
||||
where value is how you would like to horizontally align the item.
|
||||
|
||||
### Solution
|
||||
|
||||
Since this challenge requires you to (horizontally) center the item with the class `item2`, declare the following in your `.item2` CSS codeblock:
|
||||
|
||||
````css
|
||||
justify-self: center;
|
||||
````
|
||||
|
Reference in New Issue
Block a user