From b49f354d1a35cb924442fd5d9990881d18f51656 Mon Sep 17 00:00:00 2001 From: Nadia DAOUDI Date: Thu, 19 Oct 2023 21:54:24 +0200 Subject: [PATCH] adapt to small size screens --- css/style.css | 125 ++++++++++++++++++++------------------------------ index.html | 20 +++++--- 2 files changed, 64 insertions(+), 81 deletions(-) diff --git a/css/style.css b/css/style.css index 5c9bbb9..0383470 100644 --- a/css/style.css +++ b/css/style.css @@ -447,6 +447,8 @@ a:focus { flex-wrap: nowrap; justify-content: center; height: 500px; + display: flex; + flex-wrap: wrap; } @@ -456,6 +458,7 @@ a:focus { padding: 15px; background: #ffffff; border: 1px solid rgba(0, 0, 0, .07); + width: 100%; } .prof .prof-img { @@ -463,72 +466,14 @@ a:focus { overflow: hidden; } -.prof .prof-img img { - position: relative; - width: 100%; -} - -.prof .prof-social { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - display: flex; - align-items: center; - justify-content: center; - transition: .5s; -} - -.prof .prof-social a { - position: relative; - margin: 0 3px; - margin-top: 100px; - width: 40px; - height: 40px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 40px; - font-size: 16px; - color: #F7CAC9; - background: #343148; - opacity: 0; -} - -.prof .prof-social a:hover { - color: #343148; - background: #F7CAC9; -} -.prof .prof-item:hover .prof-social { - background: rgba(256, 256, 256, .5); -} - -.prof .prof-item:hover .prof-social a:first-child { - opacity: 1; - margin-top: 0; - transition: .3s 0s; -} - -.prof .prof-item:hover .prof-social a:nth-child(2) { - opacity: 1; - margin-top: 0; - transition: .3s .1s; -} - -.prof .prof-item:hover .prof-social a:nth-child(3) { - opacity: 1; - margin-top: 0; - transition: .3s .2s; +.prof .prof-img img { + width: 100%; + height: auto; + } -.prof .prof-item:hover .prof-social a:nth-child(4) { - opacity: 1; - margin-top: 0; - transition: .3s .3s; -} .prof .prof-text { position: relative; @@ -543,11 +488,25 @@ a:focus { margin: 0; } -.prof .prof-text p { - margin: 0; -} +/* Set a specific width for images on smaller screens */ +@media (max-width: 767px) { + .prof .prof-text { + position: relative; + padding: 25px 15px 10px 15px; + text-align: center; + background: #ffffff; + margin: 0 auto; /* Center the text container */ + width: 100%; + } + + .prof .prof-text h2 { + font-size: 12px; + font-weight: 600; + margin: 0; +} +} /*******************************/ @@ -679,19 +638,14 @@ a:focus { } .presenter-details img { - width: 150px; - height: 150px; + width: 100%; + max-width: 150px; /* Set a maximum width if needed */ + height: auto; /* Maintain the aspect ratio */ border-radius: 50%; margin-right: 20px; } -.event img { - width: 150px; - height: 150px; - border-radius: 50%; - margin-right: 20px; - -} + .black-underligned{ @@ -735,6 +689,18 @@ a:focus { margin-bottom: 20px; /* Optional: Add margin at the bottom of the content above the frame */ } +@media (max-width: 767.98px) { + + .event { + flex-direction: column; /* Change to column layout on smaller screens */ + align-items: flex-start; /* Align items to the start of the column */ + } + + .presenter-details { + margin-right: 0; /* Remove margin for speaker details */ + margin-bottom: 10px; /* Add a little space between speaker details and event info */ + } +} /*******************************/ /********* Contact CSS *********/ @@ -936,6 +902,15 @@ a:focus { margin: 5px 0; text-align: center; } -} + + .event { + flex-direction: column; /* Change to column layout on smaller screens */ + align-items: flex-start; /* Align items to the start of the column */ + } + .presenter-details { + margin-right: 0; /* Remove margin for speaker details */ + margin-bottom: 10px; /* Add a little space between speaker details and event info */ + } +} diff --git a/index.html b/index.html index 4fb3161..112861a 100644 --- a/index.html +++ b/index.html @@ -117,12 +117,14 @@

Welcome to TOOS!