Design for small screens first, starting with a single-column layout.
For most types of page, we recommend using either a 'two-thirds' or a 'two-thirds and one-third' layout. That stops lines of text getting so long that the page becomes difficult to read on desktop devices. This would usually mean no more than 75 characters per line.
Never make assumptions about what devices people are using. Design for different screen sizes rather than specific devices.
The default maximum page width is 1020px, but you can make it wider if your content requires it.
<ahref="#"class="govuk-back-link">Back</a><mainclass="govuk-main-wrapper"><divclass="govuk-grid-row"><divclass="govuk-grid-column-two-thirds"><h1class="govuk-heading-xl">Two-thirds column</h1><pclass="govuk-body">This is a paragraph inside a two-thirds wide column</p></div></div></main></div>
<ahref="#"class="govuk-back-link">Back</a><mainclass="govuk-main-wrapper"><divclass="govuk-grid-row"><divclass="govuk-grid-column-two-thirds"><h1class="govuk-heading-xl">Two-thirds column</h1><pclass="govuk-body">This is a paragraph inside a two-thirds wide column</p></div><divclass="govuk-grid-column-one-third"><h2class="govuk-heading-m">One-third column</h2><pclass="govuk-body">This is a paragraph inside a one-third wide column</p></div></div></main></div>
Row 1: Two-thirds Row 2: Two-thirds and one-third
<div class="app-example app-example--tabs">
<div class="app-example__toolbar">
<a href="/styles/layout/common-two-thirds-two-thirds-one-third/index.html" class="app-example__new-window" target="_blank">
Open this
<span class="govuk-visually-hidden">common two-thirds with two rows – layout</span>
example in a new tab
</a>
</div>
<iframe title="Common two-thirds with two Rows – Layout example" data-module="app-example-frame" class="app-example__frame app-example__frame--resizable app-example__frame--l" src="/styles/layout/common-two-thirds-two-thirds-one-third/index.html" frameBorder="0" loading="lazy"></iframe>
</div>
<ul class="app-tabs" role="tablist">
<li class="app-tabs__item js-tabs__item" role="presentation">
<a href="#common-two-thirds-with-two-rows-layout-example-open-html" role="tab" aria-controls="common-two-thirds-with-two-rows-layout-example-open-html" data-track="tab-html">HTML</a>
</li>
</ul>
<div class="app-tabs__heading js-tabs__heading"><a href="#common-two-thirds-with-two-rows-layout-example-open-html" aria-controls="common-two-thirds-with-two-rows-layout-example-open-html" data-track="tab-html">HTML</a></div>
<div class="app-tabs__container js-tabs__container" id="common-two-thirds-with-two-rows-layout-example-open-html" role="tabpanel">
<div class="app-example__code">
<pre data-module="app-copy" tabindex="0"><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"govuk-width-container"</span>></span>
<ahref="#"class="govuk-back-link">Back</a><mainclass="govuk-main-wrapper"><divclass="govuk-grid-row"><divclass="govuk-grid-column-two-thirds"><h1class="govuk-heading-xl">Two-thirds column</h1></div></div><divclass="govuk-grid-row"><divclass="govuk-grid-column-two-thirds"><h2class="govuk-heading-l">Two-thirds column</h2><pclass="govuk-body-l">This is a lead paragraph inside a two-thirds wide column</p><pclass="govuk-body">This is a paragraph inside a two-thirds wide column</p></div><divclass="govuk-grid-column-one-third"><h3class="govuk-heading-m">One-third column</h3><pclass="govuk-body">This is a paragraph inside a one-third wide column</p></div></div></main></div>
Building your own layout
If you want to build your layout from scratch, or understand what each of the parts are responsible for, here’s an explanation of how the page wrappers and grid system works.
Page wrappers
Limiting width of content
To set up your layout you will need to create 2 wrappers. The first should have the class govuk-width-container, which sets the maximum width of the content but does not add any vertical margin or padding.
If your design requires them, you should place components such as breadcrumbs, back link and phase banner inside this wrapper so that they sit directly underneath the header.
Add vertical space
Within govuk-width-container you should add the govuk-main-wrapper class to your <main> element. This adds responsive padding to the top and bottom of the page and will be the container for your main content.
If you’re not using the breadcrumbs, back link or phase banner components in your design, add the correct amount of vertical padding above the content by adding one of the following to your <main> element:
the govuk-main-wrapper--auto-spacing class
the govuk-main-wrapper--l class - if govuk-main-wrapper--auto-spacing does not work for your service
Use the grid system to lay out the content on your service’s pages.
Most GOV.UK pages follow a 'two-thirds and one-third' layout, but the grid system allows for a number of additional combinations when necessary.
Your main content should always be in a two-thirds column even if you’re not using a corresponding one-third column for secondary content.
Understanding the grid system
The grid is structured with a govuk-grid-row wrapper which acts as a row to contain your grid columns.
You can add columns inside this wrapper to create your layout. To define your columns add the class beginning with govuk-grid-column- to a new container followed by the width, for example govuk-grid-column-one-third to apply your desired width.
To specify a width at the desktop breakpoint you can use the desktop specific grid classes. For example govuk-grid-column-two-thirds-from-desktop will set your column width to be two-thirds width at the desktop breakpoint only.
The desktop specific classes also allow you to set the width of the tablet breakpoint by using them in combination with the standard grid classes. For example using govuk-grid-column-one-half and govuk-grid-column-two-thirds-from-desktop together will mean the column will be one-half at the tablet breakpoint and two-thirds width at desktop.
<div class="app-example app-example--tabs">
<div class="app-example__toolbar">
<a href="/styles/layout/tablet-desktop/index.html" class="app-example__new-window" target="_blank">
Open this
<span class="govuk-visually-hidden">desktop and tablet grid classes – layout</span>
example in a new tab
</a>
</div>
<iframe title="Desktop and tablet grid classes – Layout example" data-module="app-example-frame" class="app-example__frame app-example__frame--resizable app-example__frame--m" src="/styles/layout/tablet-desktop/index.html" frameBorder="0" loading="lazy"></iframe>
</div>
<ul class="app-tabs" role="tablist">
<li class="app-tabs__item js-tabs__item" role="presentation">
<a href="#desktop-and-tablet-grid-classes-layout-example-open-html" role="tab" aria-controls="desktop-and-tablet-grid-classes-layout-example-open-html" data-track="tab-html">HTML</a>
</li>
</ul>
<div class="app-tabs__heading js-tabs__heading"><a href="#desktop-and-tablet-grid-classes-layout-example-open-html" aria-controls="desktop-and-tablet-grid-classes-layout-example-open-html" data-track="tab-html">HTML</a></div>
<div class="app-tabs__container js-tabs__container" id="desktop-and-tablet-grid-classes-layout-example-open-html" role="tabpanel">
<div class="app-example__code">
<pre data-module="app-copy" tabindex="0"><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"govuk-grid-row"</span>></span>
If you need to constrain the width of an element independently of the grid system, you can use width override classes.
The width override classes start with govuk-!-width-, followed by the width on larger screen sizes. For example, govuk-!-width-one-half will apply a width of 50% and govuk-!-width-two-thirdswill apply a width of 66.66%.