Files
textual/docs/styles/grid/column_span.md
2022-12-20 09:37:07 +00:00

709 B

Column-span

The column-span style specifies how many rows a widget will span in a grid layout.

!!! note

This style only affects widgets that are direct children of a widget with `layout: grid`.

Syntax

column-span: <INTEGER>

Example

The example below shows a 4 by 4 grid where many placeholders span over several columns.

=== "Output"

```{.textual path="docs/examples/styles/column_span.py"}
```

=== "column_span.py"

```py
--8<-- "docs/examples/styles/column_span.py"
```

=== "column_span.css"

```css
--8<-- "docs/examples/styles/column_span.css"
```

CSS

column-span: 3

Python

widget.styles.column_span = 3