Shell Simple
shell-simple
is used to create a simple vertical layouts where the content
expands to fill all available space. This allows the footer
to stick to the bottom of the page.
Content that fills up available space
In shell-simple
, content
expands to fill up any available space, allowing the footer
to stick to the bottom.
<div class="shell-grid"> <main class="content">Content</main> <footer class="footer">Footer</footer></div>
Add other sections as needed
You can insert sections above content
or between content
and footer
. The height of content
will be adjusted automatically.
<div class="shell-simple"> <header>Header</header> <main class="content">Content</main> <div>Something Else</div> <footer class="footer">Footer</footer></div>
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>
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>
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>
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>
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>
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>
Please purchase a license to view this content
This content is part of our premium documentation. To access it, you'll need to have an active license for one of these products.
If you already have a license, please login to access this content.
Here’s the CSS for shell-simple
.
.shell-simple { display: flex; flex-direction: column; height: inherit;
> .content { flex-grow: 1; }
> .footer { flex-shrink: 0; }}
Here’s the CSS for shell-simple
.
.shell-simple { display: flex; flex-direction: column; height: inherit;
> .content { flex-grow: 1; }
> .footer { flex-shrink: 0; }}
Please purchase a license to view this content
This content is part of our premium documentation. To access it, you'll need to have an active license for one of these products.
If you already have a license, please login to access this content.
Shell Simple
Child Classes
Class | Description |
---|---|
content | This element grows to fill all available space |
footer | This element sticks to the bottom of the page |
Shell Simple
Child Classes
Class | Description |
---|---|
content | This element grows to fill all available space |
footer | This element sticks to the bottom of the page |
Please purchase a license to view this content
This content is part of our premium documentation. To access it, you'll need to have an active license for one of these products.
If you already have a license, please login to access this content.