GC Design SystemCSS Shortcuts
GC Design System Start to use Page templates overviewBasic page Components overviewAlertBreadcrumbsButtonCardCheckboxesContainerDate inputDate modifiedDetailsError messageError summaryFieldsetFile uploaderFooterGridHeaderHeadingIconInputLanguage toggleLinkNoticePaginationRadiosScreenreader-onlySearchSelectSide navigationSignatureStepperTableTextTextareaTheme and topic menuTop navigation CSS Shortcuts overview Reset styles Responsive layoutState Box sizingContainer sizingDisplayOverflowPositionVisibility FontFont familyFont sizeFont styleFont weightLine heightLink colourLink sizeLink text decorationList styleText alignText colourText overflowText transformWord break MarginPadding Align contentAlign itemsAlign selfFlexFlex directionFlex growFlex shrinkFlex wrapGapGrid columnsGrid rowsJustify contentJustify itemsJustify selfOrderPlace contentPlace itemsPlace self Background colourBorder colourBorder radiusBorder styleBorder width Icon namesIcon sizeImage CursorPointer eventsTransition Styles overviewDesign tokensColourSpacingTypography Contact usGet InvolvedFind a demo

Text align

The text align class sets the text-align property. It controls the horizontal alignment of text within its container. Overview
CSS Shortcut class Applied style
text-center
text-align: center;
text-justify
text-align: justify;
text-left
text-align: left;
text-right
text-align: right;

Examples

Centre
text-center

This text is centred within its container.

<p class="text-center">
  This text is centred within its container.
</p>

Justify
text-justify

This text is stretched to align evenly along the right and left edges of its container.

<p class="text-justify">
  This text is stretched to align evenly along the right and
  left edges of its container.
</p>

Left
text-left

This text is aligned to the left edge of its container.

<p class="text-left">
  This text is aligned to the left edge of its container.
</p>

Right
text-right

This text is aligned to the right edge of its container.

<p class="text-right">
  This text is aligned to the right edge of its container.
</p>
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:text-center ...">
  ...
</div>
Learn more about the responsive layout prefix. 2025-10-01