🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
Back to CSS Notes
Topic #184

Grid Item Align


CSS Grid Items - Alignment

Grid items can be aligned within their respective grid cells using properties like:

  • justify-self - Specifies the horizontal alignment within a cell
  • align-self - Specifies the vertical alignment within a cell
  • place-self - Shorthand property for align-self and justify-self

These can also be applied to all grid items in a container using justify-items and align-items on the grid container.


The CSS justify-self Property

The justify-self property is used to align a grid item within its grid cell in the inline direction.

Tip: For pages in English, inline direction is left to right and block direction is top to bottom.

This property can have one of the following values:

  • auto (default)
  • normal
  • stretch
  • start
  • left
  • center
  • end
  • right

Note: For this property to have any alignment effect, the grid item need available space around itself in the inline direction.

Example

  .item1 {justify-self: right;}
.item6 {justify-self:
  center;}

The CSS align-self Property

The align-self property is used to align a grid item within its grid cell in the block direction.

This property can have one of the following values:

  • auto (default)
  • normal
  • stretch
  • start
  • end
  • center

Note: For this property to have any alignment effect, the grid item need available space around itself in the block direction.

Example

  .item1 {align-self: start;}
.item6 {align-self: center;}

CSS Grid Item Alignment Properties

Property Description
align-self Align a grid item within its grid cell in the block direction
justify-self Align a grid item within its grid cell in the inline direction
place-self A shorthand property for align-self and justify-self

Want to go beyond the notes?

Join CodingNow 2.0's CSS course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Grid Item Align – FAQs

Quick answers about learning Grid Item Align in CSS.

This free note from CodingNow 2.0 explains Grid Item Align in CSS — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every CSS topic on CodingNow 2.0, including Grid Item Align, is 100% free with no signup required.
With focused practice, most students grasp Grid Item Align in 1–3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) — expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now