GC Design System CSS Shortcuts
Home Start to use Page templates overview Basic page Components overview Breadcrumbs Button Card Checkboxes Container Date input Date modified Details Error message Error summary Fieldset File uploader Footer Grid Header Heading Icon Input Language toggle Link Notice Pagination Radios Screenreader-only Search Select Side navigation Signature Stepper Text Textarea Theme and topic menu Top navigation CSS shortcuts overview Reset styles Responsive layout State Box sizing Container sizing Display Overflow Position Visibility Font Font family Font size Font style Font weight Line height Link colour Link size Link text decoration List style Text align Text colour Text overflow Text transform Word break Margin Padding Align content Align items Align self Flex Flex direction Flex grow Flex shrink Flex wrap Gap Grid columns Grid rows Justify content Justify items Justify self Order Place content Place items Place self Background colour Border colour Border radius Border style Border width Icon names Icon size Image Cursor Pointer events Transition Styles overview Design tokens Colour tokens Spacing tokens Typography tokens Contact us Get involved Find a demo

Place items

The place items class sets the place-items property. It is a shorthand for setting the cross axis and the main axis. It controls how items are aligned inside their grid areas along both axes in a grid container.

In flexbox, justify-items is ignored, so place-items has no effect.

Overview

CSS Shortcut class Applied style
place-items-center
place-items: center;
place-items-stretch
place-items: stretch;
place-items-start
place-items: start;
place-items-end
place-items: end;

Examples

Centre
place-items-center

These items are centred both vertically and horizontally within their grid areas.

1

2

3

4

5

6

<div class="d-grid grid-cols-3 place-items-center">
  <p>1</p>
  <p>2</p>
  <p>3</p>
  <p>4</p>
  <p>5</p>
  <p>6</p>
</div>

Stretch
place-items-stretch

These items stretch to fill their grid areas both horizontally and vertically, if no fixed size is set.

1

2

3

4

5

6

<div class="d-grid grid-cols-3 place-items-stretch">
  <p>1</p>
  <p>2</p>
  <p>3</p>
  <p>4</p>
  <p>5</p>
  <p>6</p>
</div>

Start
place-items-start

These items align to the start edge of both axes within their grid areas.

1

2

3

4

5

6

<div class="d-grid grid-cols-3 place-items-start">
  <p>1</p>
  <p>2</p>
  <p>3</p>
  <p>4</p>
  <p>5</p>
  <p>6</p>
</div>

End
place-items-end

These items align to the end edge of both axes within their grid areas.

1

2

3

4

5

6

<div class="d-grid grid-cols-3 place-items-end">
  <p>1</p>
  <p>2</p>
  <p>3</p>
  <p>4</p>
  <p>5</p>
  <p>6</p>
</div>

Conditional styling Apply this style to specific screen sizes Use a responsive layout prefix to apply this class only to a specified screen size. The available breakpoints are:

  • xs: > 480px
  • sm: > 640px
  • md: > 768px
  • lg: > 1024px
  • xl: > 1280px
  
<div class="xs:place-items-center ...">
  ...
</div>
  

Learn more about the responsive layout prefix.

2025-10-01