Basic Usage
shell-simple
contains two two main layers:
content
footer
<div class="shell-simple"> <main class="content">Content</main> <footer class="footer">Footer</footer></div>
Content
Adding other sections
You can add sections above content
or between content
and footer
. The content
section’s height will automatically adjust to fill the available space.
<div class="shell-simple"> <header>Header</header> <main class="content">Content</main> <div>Another section</div> <footer class="footer">Footer</footer></div>
Another section
Adjusting Gap Between Sections
shell-simple
uses flexbox under the hood. You can change the gap
property to adjust the space between sections.
<div class="shell-simple gap-4"> ...</div>
.shell-simple { gap: 1rem;}
Sticky Sidebar within Content
To create a sticky sidebar within content
(like the one on this page), use a grid inside content
and apply sticky
to the sidebar.
<div class="shell-simple"> <div class="content"> <div class="grid-simple [--cols:2]"> <main>Content</main> <aside class="sticky">Sticky Sidebar</aside> </div> </div></div>
Paragraph 1
Paragraph 2
Paragraph 3
Paragraph 4
Paragraph 5
Paragraph 6
Paragraph 7
Paragraph 8
Paragraph 9
Paragraph 10
Paragraph 11
Paragraph 12
Paragraph 13
Paragraph 14
Paragraph 15
Paragraph 16
Paragraph 17
Paragraph 18
Paragraph 19
Paragraph 20
Sticky Sidebar