CSS place-self Property

Beginner
⏱️ 6 min read
📚 Updated: Jun 2026
🎯 4 Examples
Grid & Flexbox

What You’ll Learn

The place-self property is a shorthand for align-self and justify-self. It aligns one item inside its cell without changing every sibling.

01

One Item

Self alignment.

02

Shorthand

Two in one.

03

auto

Default value.

04

center

Common override.

05

Grid

Best fit.

06

Override

vs place-items.

Introduction

The place-self property in CSS is a shorthand property that allows you to set both the align-self and justify-self properties in a single declaration.

This property is particularly useful when working with CSS Grid, as it provides a convenient way to align an individual grid item within its grid area both horizontally and vertically.

Definition and Usage

Set place-items on the container for the default alignment of all children, then use place-self on one child when that item needs different placement.

This pattern is common for featured cards, highlighted tiles, or any layout where one element should break the grid’s default alignment.

💡
Beginner Tip

Think of place-items as the team rule and place-self as one player choosing a different position inside their area.

📝 Syntax

The syntax for the place-self property is straightforward. You can specify one or two values, where the first value sets the align-self property and the second value sets the justify-self property.

syntax.css
element {
  place-self: align-self justify-self;
}

If only one value is provided, it will apply to both align-self and justify-self.

Basic Example

place-self.css
.centered {
  place-self: center;
}

Syntax Rules

  • Apply place-self on the child item, not the container.
  • One value sets both align-self and justify-self.
  • Two values set block axis first, then inline axis.
  • auto inherits alignment from the container’s place-items rule.
  • Most powerful in grid layouts with explicit cell areas.
  • Use when only one item needs a different position inside its cell.

🎯 Default Value

The default value of the place-self property is auto. This means the grid item will follow the default alignment specified by the grid container.

⚡ Quick Reference

QuestionAnswer
Shorthand foralign-self + justify-self
Applies toGrid and flex items
InheritedNo
AnimatableNo
Common useOverride alignment for one child item

💎 Property Values

place-self accepts the same values as align-self and justify-self.

ValueExampleDescription
autoplace-self: auto;The default value. The item follows the container’s alignment.
startplace-self: start;Aligns the item at the start of the container.
endplace-self: end;Aligns the item at the end of the container.
centerplace-self: center;Centers the item within the container.
stretchplace-self: stretch;Stretches the item to fill the container.
auto center start end stretch

When Does place-self Matter?

place-self is the right tool when one item needs custom placement:

  • Featured tile — Center or enlarge one card in a dashboard grid.
  • Offset badge — Push one element to a corner of its cell.
  • Exception layouts — Keep container defaults but break one rule.
  • Less markup — Avoid wrapper divs just to reposition one child.

If every item should align the same way, use place-items on the container instead.

👀 Live Preview

All items use place-items: start on the container, but one item overrides with place-self: center.

Default only

A
B
C
D

One place-self

A
B
C
D

Examples Gallery

Start with the reference centered item, override one cell with two values, stretch a single item, and highlight a featured card.

▦ Grid Self Alignment

Use place-self on individual grid items — matching the reference example.

Example 1 — Centered Grid Item

In this example, we’ll use the place-self property to center a grid item both horizontally and vertically within its grid area.

place-self-center.html
<style>
  .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
  }

  .centered {
    place-self: center;
  }
</style>

<div class="container">
  <div class="item">Item 1</div>
  <div class="item centered">Centered Item</div>
  <div class="item">Item 3</div>
</div>
Try It Yourself

How It Works

Only the item with .centered is repositioned inside its cell. Siblings keep the container’s default alignment.

Example 2 — Two Values on One Item

Use place-self: end start to move one item to the bottom-left while the container keeps place-items: center.

place-self-two-values.html
<style>
  .container {
    display: grid;
    place-items: center;
  }

  .corner {
    place-self: end start;
  }
</style>
Try It Yourself

How It Works

The first value sets block-axis alignment (end). The second sets inline-axis alignment (start) for that item only.

🔀 Overrides & Highlights

Stretch one cell or highlight a featured card with self alignment.

Example 3 — Stretch One Item

Apply place-self: stretch so one grid item grows to fill its entire cell.

place-self-stretch.html
<style>
  .container {
    display: grid;
    place-items: center;
  }

  .fill-cell {
    place-self: stretch;
  }
</style>
Try It Yourself

How It Works

stretch makes the selected item expand to the full size of its grid area, which is useful for full-cell buttons or panels.

place-self vs place-items

place-items sets the default alignment for all children on the container. place-self overrides that default for one item.

It is shorthand for align-self and justify-self.

container-and-item.css
.container {
  display: grid;
  place-items: start;
}

.featured {
  place-self: center;
}

🧠 How place-self Works

1

Container sets the default

place-items defines how most children align in their cells.

place-items
2

One child uses place-self

That item overrides the default with its own alignment rule.

place-self
3

The item moves inside its cell

Only that child’s position changes. Siblings are unaffected.

Self alignment
=

Targeted layout control

One highlighted or offset item without rewriting the whole grid.

Browser Compatibility

The place-self property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. However, it is always a good practice to test your website across different browsers to ensure compatibility.

Grid · Modern support

Reliable place-self support

Chrome, Firefox, Safari, Edge, and Opera support place-self for grid item alignment.

96% Modern browser support
Google Chrome 59+ · Desktop & Mobile
Full support
Mozilla Firefox 45+ · Desktop & Mobile
Full support
Apple Safari 11+ · macOS & iOS
Full support
Microsoft Edge 79+ · Chromium
Full support
Opera 46+ · Modern versions
Full support

Testing tip

Test grid overrides in Safari and Firefox if you rely on justify-self with unusual track sizing.

place-self property 96% supported

Bottom line: place-self is widely supported for grid layouts in modern browsers.

Conclusion

The place-self property is a powerful tool for web developers working with CSS Grid.

By allowing you to align individual grid items both horizontally and vertically in a single declaration, it simplifies the process of creating complex grid layouts. Experiment with different values and see how this property can enhance the design and layout of your web projects.

💡 Best Practices

✅ Do

  • Use place-items on the container and place-self for exceptions
  • Apply place-self: center to highlight one tile or card
  • Use two values when block and inline alignment should differ
  • Prefer grid layouts for full justify-self behavior
  • Keep item sizes explicit when centering small elements

❌ Don’t

  • Put place-self on every child when place-items is enough
  • Confuse place-self with place-content
  • Expect justify-self to behave the same in all flex cases
  • Use stretch when the item should keep its natural size
  • Forget that auto follows the container default

Key Takeaways

Knowledge Unlocked

Five things to remember about place-self

Use these points when aligning one item inside its cell.

5
Core concepts
02

auto Default

Follow container.

Default
03

center

Common override.

Pattern
04

Grid Focus

Cell placement.

Context
pi 05

place-items

Container default.

Companion

❓ Frequently Asked Questions

place-self is a shorthand that sets align-self and justify-self on one item. It controls how that individual item aligns inside its grid cell or flex area.
place-items sets alignment for all children on the container. place-self overrides alignment for one specific child.
The default value is auto, which means the item follows the container's align-items and justify-items alignment.
align-self works on flex items. justify-self is mainly useful in grid layouts, so place-self is most common on grid items.
A single value applies to both align-self and justify-self. For example, place-self: center centers that one item on both axes.

Practice in the Live Editor

Open the HTML editor, build a grid, and use place-self to reposition one item.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful