grid og flex css

This commit is contained in:
Geir Okkenhaug Jerstad 2024-08-14 09:44:23 +02:00
parent c7a62b1f8b
commit 79b0cd3da4
6 changed files with 14 additions and 9 deletions

View file

@ -9,13 +9,14 @@
div.main { div.main {
background-color: transparent; background-color: transparent;
border-bottom: none; border-bottom: none;
display: flex; display: grid;
flex-direction: row; grid-template-columns: 1fr 2fr 1fr;
flex-wrap: wrap; grid-template-rows: 1fr 1fr 1fr;
align-items: center; align-items: center;
} }
div { div {
flex-grow: 1;
background-color: lightblue; background-color: lightblue;
border-bottom: 1px solid black; border-bottom: 1px solid black;
} }
@ -30,7 +31,7 @@
<div> <div>
<h2>Verden!</h2> <h2>Verden!</h2>
</div> </div>
<div>Aaaaa aaaa <div>Aaaaa aaaa<br>
aaaa aaaa aaaa aaaa
</div> </div>
<div>Bbbbb bbbb bbbb bbbb</div> <div>Bbbbb bbbb bbbb bbbb</div>
@ -39,7 +40,7 @@
<div> <div>
<p>Sint exercitation est duis proident velit duis cupidatat ex aliqua eu. <p>Sint exercitation est duis proident velit duis cupidatat ex aliqua eu.
Mollit tempor velit est occaecat laboris mollit dolore laborum id. Mollit tempor velit est occaecat laboris mollit dolore laborum id.
Sunt dolore mollit ex laboris veniam eu incididunt culpa.</p> Sunt dolore mollit <br> ex laboris veniam eu incididunt culpa.</p>
</div> </div>
<div> <div>

0
htmx/index.html Normal file
View file

View file

@ -13,16 +13,20 @@
"sidebar main" "sidebar main"
"sidebar footer footer"; "sidebar footer footer";
} }
.item-a { .item-a {
grid-area: sidebar; grid-area: sidebar;
} }
.item-b { .item-b {
grid-area: topbar; grid-area: topbar;
} }
.item-c{
.item-c {
grid-area: main; grid-area: main;
} }
.item-d{
.item-d {
grid-area: footer; grid-area: footer;
} }
</style> </style>

View file

@ -6,6 +6,6 @@ nøkkeltek:
* incus * incus
* libvirt * libvirt
agent - clustering - go agent - clustering - go/rust eller guile
frontend/web og cli - frontend/web og cli - go
middleware - bash nix guile middleware - bash nix guile