From baba1ecfda04cfe7703c8ee5dad14ea01b0e3d04 Mon Sep 17 00:00:00 2001 From: gamerdonkey Date: Tue, 2 Feb 2021 04:35:31 +0000 Subject: [PATCH] Using flexbox for gallery layout. --- gallery.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gallery.css b/gallery.css index 89f38f4..0fe8561 100644 --- a/gallery.css +++ b/gallery.css @@ -2,9 +2,9 @@ html { background-color: #2c3e50; color: #eee; } .wrapper { max-width: 1286px; margin: 0 auto; } a { color: #00aced; } -ul.gallery { background-color: #eee; padding: 0; } -ul.gallery li { display: inline-block; list-style-type: none; outline: 2px solid #00aced; background-color: #000; } +ul.gallery { display: flex; flex-flow: row wrap; justify-content: space-evenly; background-color: #eee; padding: 0; } +ul.gallery li { display: inline-block; list-style-type: none; width: 32%; margin-top: 0.8em; outline: 2px solid #00aced; background-color: #000; } ul.gallery li a { text-decoration: none; } ul.gallery li a:hover { color: yellow; } ul.gallery li p { font-size: large; text-align: center; color: #fff; } -ul.gallery li img { max-width: 100%; background-color: white; } \ No newline at end of file +ul.gallery li img { max-width: 100%; background-color: white; }