From a2d75c2b59f192e7c78dae64d7a87338bc6a3107 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Mon, 9 Nov 2020 01:12:59 +0100 Subject: Make sidebars sticky --- artistes.css | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'artistes.css') diff --git a/artistes.css b/artistes.css index 9b5c036..6e2007f 100644 --- a/artistes.css +++ b/artistes.css @@ -1,14 +1,12 @@ -body { - height: 100vh; -} - .main { display: flex; + background: #f00; } .main-social { overflow: auto; flex-grow: 1; + background: #f44; } .main div { @@ -17,6 +15,9 @@ body { .main #photos { flex: 1; + align-self: flex-start; + position: sticky; + top: 0; background: #eee; } @@ -26,7 +27,7 @@ body { } #photos img { - width: 40%; + width: 25%; border-color: #ddd; border-width: 1vw; border-style: solid; -- cgit v1.2.3