2018-10-12 19:37:13 +00:00
|
|
|
---
|
|
|
|
title: Align an Item Horizontally using justify-self
|
|
|
|
---
|
|
|
|
## Align an Item Horizontally using justify-self
|
|
|
|
|
2018-10-31 18:09:50 +00:00
|
|
|
In this challenge you are required to use the "justify-self" property to horizontally align a grid item.
|
2018-10-12 19:37:13 +00:00
|
|
|
|
2018-10-31 18:09:50 +00:00
|
|
|
### Hint
|
2018-10-12 19:37:13 +00:00
|
|
|
|
2018-10-31 18:09:50 +00:00
|
|
|
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;
|
|
|
|
````
|