> For the complete documentation index, see [llms.txt](https://storypress.gitbook.io/storypress-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://storypress.gitbook.io/storypress-docs/content-blocks/container.md).

# Container

The **Container** block is your main **layout** block. It doesn’t show content by itself—it **wraps other blocks** and arranges them in **columns** with alignment and spacing. Use it to put text on one side and an image on the other, or to group sections and control width.

***

## Why use it

* **Columns** — 1, 2, or 3 columns. **2 columns** = classic “text here, image there” (or two text blocks, or two images). **3 columns** = three equal areas (e.g. features, team, pricing).
* **Alignment** — Justify, Center, Left, or Right for content inside the container.
* **Column position** — When columns have different heights: **Stretch** (equal height), **Top**, **Middle**, or **Bottom** so content lines up the way you want.
* **Gap** — Space between columns. Tune it for a tight or loose layout.
* **Card** — Optional card style around the whole container.
* **Background** — Add a Background block inside for a colored or image section.

***

## How to use it

1. Add a **Container** block to the page.
2. Set **Columns** (1, 2, or 3). At 768px and below, columns stack automatically.
3. Add blocks **inside** the container: e.g. [**Rich text**](/storypress-docs/content-blocks/rich-text.md) in the first column, [**Images**](/storypress-docs/content-blocks/gallery.md) or **Asset** in the second for text + image side by side.
4. Set **Alignment** and **Column position** so content lines up (e.g. middle-aligned columns, or top-aligned).
5. Optionally add **Background** inside the container or turn on **Card**.

***

## Main options

| Option              | Description                                                                                                              |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Columns**         | 1, 2, or 3. On mobile (768px), they stack.                                                                               |
| **Alignment**       | Justify, Center, Left, Right for content in the container.                                                               |
| **Column position** | Stretch, Top, Middle, Bottom for vertical alignment of columns.                                                          |
| **Gap**             | Space between columns.                                                                                                   |
| **Sticky footer**   | When columns = 2 or 3 and position = Stretch, the last element in shorter columns can stick to the bottom of its column. |
| **Card**            | Wrap the container in a card style.                                                                                      |
| **Background**      | One Background block allowed inside for section background.                                                              |

***

## Tips

* Use **2 columns** for “text left, image right” (or the reverse by block order). Use [**Image + text**](/storypress-docs/content-blocks/image-text-rich.md) when you only need one image + one text block and want that pattern in a single block.
* **Column position: Middle** is useful when one column is much shorter so it doesn’t sit at the top.
* Use **1 column** with a max-width or alignment to get a centered content column; add a Background inside for full-width colored sections.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://storypress.gitbook.io/storypress-docs/content-blocks/container.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
