---
title: "Layout helpers"
description: "Small rules for what the other layouts do not cover."
group: "Layout"
order: 10
---

Small rules for what the other layouts do not cover.

Styles: `layout.css`.

```html
<div class="moin-stack" data-gap="4">
  <p class="moin-narrow moin-text" style="--width:20rem">This line stops at 20rem, as wide as it reads well.</p>
  <div class="moin-hide-empty"></div>
  <div class="moin-row" data-gap="2">
    <div id="demo-places" class="moin-contents">
      <span class="moin-badge">Counts as</span>
      <span class="moin-badge">part of the row</span>
    </div>
    <span class="moin-badge">in the row</span>
  </div>
  <div class="moin-scroll" data-both style="--scroll-max:6rem">
    <div class="moin-text moin-stack" data-gap="1">
      <span>Scrolls both ways.</span>
      <span>Second line.</span>
      <span>Third line.</span>
      <span>Fourth line.</span>
      <span>Fifth line.</span>
      <span>Sixth line.</span>
      <span>Seventh line.</span>
    </div>
  </div>
</div>
```

- `moin-narrow` is as wide as text reads well, or `--width`. On a `moin-page` it stays centered.
- `moin-hide-empty` takes no room while it is empty. Use it for a place an answer swaps into.
- `moin-contents` holds only an id. What is in it counts as being in its place in a row or grid.
- `moin-scroll` scrolls sideways. `data-both` scrolls both ways, up to `--scroll-max` high. What stays in view inside needs this box.

## Jumping to a place

A link to `#something` stops under a floating bar, for anything with an `id`. Nothing to add. `--jump` on the target changes the distance, 6rem by default.
