textual/docs/examples/how-to/center02.py
Will McGugan dbd3644577
center how to (#3031)
* center how to

* words

* words
2023-07-31 09:56:46 +01:00

25 lines
440 B
Python

from textual.app import App, ComposeResult
from textual.widgets import Static
class CenterApp(App):
"""How to center things."""
CSS = """
Screen {
align: center middle;
}
#hello {
background: blue 50%;
border: wide white;
}
"""
def compose(self) -> ComposeResult:
yield Static("Hello, World!", id="hello")
if __name__ == "__main__":
app = CenterApp()
app.run()