2017-08-14 17:25:14 +00:00
|
|
|
---
|
|
|
|
title: Nesting columns
|
2024-03-21 16:11:54 +00:00
|
|
|
layout: docs
|
|
|
|
theme: library
|
|
|
|
doc-library: true
|
2017-08-14 17:25:14 +00:00
|
|
|
doc-tab: columns
|
|
|
|
doc-subtab: nesting
|
2018-04-09 11:45:52 +00:00
|
|
|
breadcrumb:
|
2024-03-21 16:11:54 +00:00
|
|
|
- home
|
|
|
|
- documentation
|
|
|
|
- columns
|
|
|
|
- columns-nesting
|
2017-08-14 17:25:14 +00:00
|
|
|
---
|
|
|
|
|
2018-04-09 11:45:52 +00:00
|
|
|
<div class="content">
|
|
|
|
<p>
|
2024-03-21 16:11:54 +00:00
|
|
|
You can <strong>nest</strong> columns to have more flexibility in your
|
|
|
|
design. You only need to follow this structure:
|
2018-04-09 11:45:52 +00:00
|
|
|
</p>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<code>columns</code>: top-level columns container
|
2017-08-14 17:25:14 +00:00
|
|
|
<ul>
|
|
|
|
<li>
|
2018-04-09 11:45:52 +00:00
|
|
|
<code>column</code>
|
2017-08-14 17:25:14 +00:00
|
|
|
<ul>
|
|
|
|
<li>
|
2018-04-09 11:45:52 +00:00
|
|
|
<code>columns</code>: nested columns
|
2017-08-14 17:25:14 +00:00
|
|
|
<ul>
|
2024-03-21 16:11:54 +00:00
|
|
|
<li><code>column</code> and so on…</li>
|
2017-08-14 17:25:14 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2018-04-09 11:45:52 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p>
|
2024-03-21 16:11:54 +00:00
|
|
|
The difference with
|
|
|
|
<a href="{{ site.url }}/documentation/columns/options/#multiline"
|
|
|
|
>multiline columns</a
|
|
|
|
>
|
|
|
|
is the <strong>order</strong> in the HTML code: all the
|
|
|
|
<strong class="has-text-info">blue</strong> columns appear
|
|
|
|
<em>before</em> the <strong class="has-text-danger">red</strong> ones.
|
|
|
|
Resize to a narrower viewport to see the result.
|
2018-04-09 11:45:52 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
2017-08-14 17:25:14 +00:00
|
|
|
|
2018-10-28 22:14:31 +00:00
|
|
|
{% capture columns_nested_example %}
|
2018-04-09 11:45:52 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<p class="bd-notification is-info">First column</p>
|
|
|
|
<div class="columns is-mobile">
|
2017-08-14 17:25:14 +00:00
|
|
|
<div class="column">
|
2018-04-09 11:45:52 +00:00
|
|
|
<p class="bd-notification is-info">First nested column</p>
|
2017-08-14 17:25:14 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-04-09 11:45:52 +00:00
|
|
|
<p class="bd-notification is-info">Second nested column</p>
|
2017-08-14 17:25:14 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p class="bd-notification is-danger">Second column</p>
|
|
|
|
<div class="columns is-mobile">
|
|
|
|
<div class="column is-half">
|
|
|
|
<p class="bd-notification is-danger">50%</p>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p class="bd-notification is-danger">Auto</p>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p class="bd-notification is-danger">Auto</p>
|
|
|
|
</div>
|
2017-08-14 17:25:14 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
2024-03-21 16:11:54 +00:00
|
|
|
{% endcapture %} {{ columns_nested_example }}
|
2018-04-09 11:45:52 +00:00
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<p>
|
2024-03-21 16:11:54 +00:00
|
|
|
Multiline columns will also have a <strong>gap</strong> between each
|
|
|
|
<strong>line</strong>.
|
2018-04-09 11:45:52 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
2018-10-28 22:14:31 +00:00
|
|
|
|
2021-01-27 23:30:42 +00:00
|
|
|
<div class="bd-highlight-full">
|
2024-03-21 16:11:54 +00:00
|
|
|
{% highlight html -%} {{- columns_nested_example -}} {%- endhighlight %}
|
2018-10-28 22:14:31 +00:00
|
|
|
</div>
|