Main content and sidebar
Main content and sidebar
Standard layout for the main content area and sidebar.
By default .content__main
and .content__sidebar
stack vertically. When using the modifiers described below to create columns, the columns will remain stacked for smaller screens and then convert to to columns at 801px
.
Inline styling is for demonstration purposes only; do not include it in your markup.
HTML code snippet
<main class="content" role="main">
<section class="content_hero" style="background: #E3E4E5">
Content hero
</section>
<div class="wrapper">
<section class="content__main">
Main content area
</section>
<aside class="content__sidebar" style="background: #F1F2F2">
Sidebar
</aside>
</div>
</main>
Left-hand sidebar layout
Add a class of .content__L-R
to main.content
to determine the width ratio of .content__main
and .content__sidebar
, where ‘L’ is the left-hand item and ‘R’ is the right-hand item. The two common configurations are 1-3 (sidebar on the left, content on the right, in a ratio of 1:3) and 2-1 (content on the left, sidebar on the right, in a ratio of 2:1).
It is assumed that the content is wider than the sidebar.
Main content area
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cum corrupti tempora nam nihil qui mollitia consectetur corporis nemo culpa dolorum! Laborum at eos deleniti consequatur itaque officiis debitis quisquam! Provident!
HTML code snippet
<main class="content content--1-3" role="main">
<div class="content__line"></div>
<div class="wrapper">
<aside class="content__sidebar">
Section navigation
</aside>
<section class="content__main">
<h2>Main content area</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Cum corrupti tempora nam nihil qui mollitia consectetur
corporis nemo culpa dolorum! Laborum at eos deleniti
consequatur itaque officiis debitis quisquam! Provident!
</p>
</section>
</div>
</main>
<footer class="footer" role="contentinfo">
<div class="wrapper">
Footer
</div>
</footer>
Right-hand sidebar layout
Add a class of .content__L-R
to main.content
to determine the width ratio of .content__main
and .content__sidebar
, where ‘L’ is the left-hand item and ‘R’ is the right-hand item. The two common configurations are 1-3
(sidebar on the left, content on the right, in a ratio of 1:3) and 2-1
(content on the left, sidebar on the right, in a ratio of 2:1).
It is assumed that the content is wider than the sidebar.
Inline styling is for demonstration purposes only; do not include it in your markup.
Main content area
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cum corrupti tempora nam nihil qui mollitia consectetur corporis nemo culpa dolorum! Laborum at eos deleniti consequatur itaque officiis debitis quisquam! Provident!
HTML code snippet
<main class="content content--2-1" role="main">
<div class="content__line"></div>
<div class="wrapper">
<section class="content__main">
<h2>Main content area</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Cum corrupti tempora nam nihil qui mollitia consectetur
corporis nemo culpa dolorum! Laborum at eos deleniti
consequatur itaque officiis debitis quisquam! Provident!
</p>
</section>
<aside class="content__sidebar" style="background: #F1F2F2">
Sidebar
</aside>
</div>
</main>
<footer class="footer" role="contentinfo">
<div class="wrapper">
Footer
</div>
</footer>