Files
textual/docs/styles/height.md
Will McGugan 7040d00c7b more docs
2022-07-30 17:01:51 +01:00

597 B

Height

The height style sets a widget's height. By default, it sets the width of the content area, but if box-sizing is set to border-box it sets the width of the border area.

Example

=== "width.py"

```python
--8<-- "docs/examples/styles/height.py"
```

=== "Output"

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

CSS

/* Explicit cell height */
height: 10;

/* Percentage height */
height: 50%;

/* Automatic height */
width: auto

Python

self.styles.height = 10
self.styles.height = "50%
self.styles.height = "auto"