Centered Container

Combine width or max-width values with the center class to create a centered container for your content.

Centered Container


<section class="mw5 mw7-ns center bg-light-gray pa3 ph5-ns">
  <h1 class="mt0">Centered Container</h1>
  <p class="lh-copy measure">
    Combine width or max-width values with the center class to create a centered
    container for your content.


.lh-copy {
    line-height: 1.5;

.mw5 {
    max-width: 16rem;

.bg-light-gray {
    background-color: #eee;

.pa3 {
    padding: 1rem;

.mt0 {
    margin-top: 0;

.measure {
    max-width: 30em;

.center {
    margin-right: auto;
    margin-left: auto;

@media screen and (min-width: 30em) {
    .mw7-ns {
        max-width: 48rem;

    .ph5-ns {
        padding-left: 4rem;
        padding-right: 4rem;

Css stats for this component

Gzipped Size

Install via npm Only installs the needed tachyons-modules for this component

npm i --save tachyons-line-height tachyons-max-widths tachyons-skins tachyons-spacing tachyons-typography tachyons-utilities

Other Components

Article Lists

Title Preview Author Media Flipped Title Preview Author Media


Feature Full Bleed Background Headline Title Text Large Title Text Left Title Top Border Left Title Photo Essay Single Column Large Title Title Highlight Header Cover Title Text Image Title Text


Circle Border Circle Double Ring Rounded Large Rounded Medium Rounded Small Square


Basic Info Single Cta


Basic Previous Next Basic Rounded Extra Small Basic Rounded Small Basic Rounded Basic Centered Icons Pill Grow Pill


Album Centered Album Left Basic Text Card News Card Product Card Profile Card Title Subtitle Profile Card Suggested Profile Text Card


Albums Movies Posters Dim Posters Square Title Subtitle Vinyl

Definition Lists

Inline Simple

Error Pages



Centered Icons Hover Glow Inline Text Simple Large Type Small Print Social Circles Social Simple Text Social Simple Social Text Social Studios


Checkbox List Input Text Label Newsletter Subscription Password Sign In Sign Up Textarea Label


Circle Avatar Title Subtitle Rounded Avatar Title Subtitle Startup Hero


Aspect Ratio 16x9 Aspect Ratio 1x1 Aspect Ratio 3x4 Aspect Ratio 4x3 Aspect Ratio 4x6 Aspect Ratio 5x7 Aspect Ratio 5x8 Aspect Ratio 6x4 Aspect Ratio 7x5 Aspect Ratio 8x5 Aspect Ratio 9x16 Centered Container Five Column Collapse Alternate Five Column Collapse Asymmetrical Five Column Collapse Mixed Five Column Collapse One Five Column Fixed Table Layout Grid Mixed Rows Fixed Table Layout Grid Flag Object Bottom Flag Object Collapse Flag Object Top Flag Object Four Column Collapse Two Collapse One Four Column Collapse Two Four Column Full Bleed 16x9 Full Bleed 4x6 Full Bleed 5x7 Full Bleed 5x8 Full Bleed 6x4 Full Bleed 7x5 Full Bleed 8x5 Full Bleed 9x16 Full Bleed Square Full Screen Centered Title Horizontal Aspect Ratios Three Column Collapse One Three Column Two Column Collapse One Two Column


Animate Background Color Animate Color Dim No Underline Underline On Hover


Block Item Dotted Border Border Spaced Border Tight Contact Phone Follower Notifications Rounded Square Avatar Follower Notifications Hashtags Items Image Title Price Large Links Inline Links Animate Color Links Inline Links With Borders Inline Slab Stat Large Slab Stat Small Slab Stat Title Text


Iphone App


Fixed Semi Transparent Large Title Link List List Overflow Logo Links Inline Collapse Logo Links Inline Logo Titles Links Centered Minimal Sign Up Title Link List


4x4 Mixed Grid Double Portfolio Project Swiss Cover Five Columns


Left Border Pull Quote


Basic Striped Dark


Large Paragraph Narrow Paragraph Paragraph Small Narrow Paragraph Small Paragraph Title Subtitle Centered Wide Paragraph