Mobile responsive have overflow-y - css

Trying to find issue two days and maybe I miss something. I create grid website. All working fine, but when is on mobile view have overflow-y. When I create template all be fine, and when start adding styles and colors, then problem start. I don't know why, if anyone can check code and tell me what I wrong. Thanks
:root {
--first: #7d9aff;
--hover: #9bbeff;
}
body {
font-family: 'Dosis', sans-serif;
max-height:100%;
margin: 0;
}
h1 { font-size: 70px }
h2 { font-size: 50px }
h3 { font-size: 30px }
h4 { font-size: 20px }
p { font-size: 18px }
a { text-decoration: none; }
ul.korisniLinkoiv {
padding-left: 7px;
font-size: 18px;
}
.korisniLinkoiv li {
list-style-type: none;
}
.korisniLinkoiv li a {
color: white;
}
.top,
.menu,
.features,
.webDesign,
.webHosting,
.servisRacunara,
.podrska {
margin: 15px;
font-size: 15px;
}
button {
background: var(--first);
color: white;
border: 0;
padding: 10px 20px;
}
button:hover {
background: #5979ce;
cursor: pointer;
}
#btn-large {
padding: 18px 55px;
font-size: 14px;
border-radius: 6px;
-webkit-box-shadow: 0 5px 7px rgba(155, 190, 255, 0.52);
-moz-box-shadow: 0 5px 7px rgba(155, 190, 255, 0.52);
box-shadow: 0 5px 7px rgba(155, 190, 255, 0.52);
-webkit-transition: all 0.3s ease 0.0s;
-moz-transition: all 0.3s ease 0.0s;
transition: all 0.3s ease 0.0s;
}
#btn-large:hover {
-webkit-transform: scale(1.1) rotate(4deg);
transform: scale(1.1) rotate(4deg);
}
img {
max-width: 100%;
}
/* .wrapper */
.wrapper {
display: grid;
grid-gap: 20px;
}
/* Top */
.top {
display: grid;
grid-gap: 20px;
grid-template-areas:
"hero hero cta1"
"hero hero cta2";
min-height: 97vh;
}
.hero {
grid-area: hero;
min-height: 400px;
background: url(assets/images/razvoj.jpg);
background-size: cover;
background-position: bottom right;
padding: 50px;
display: flex;
flex-direction: column;
align-items: start;
justify-content: center;
}
.hero > * {
background: var(--first);
padding: 5px;
}
.cta {
background: var(--first);
display: grid;
align-items: center;
justify-items: center;
align-content: center;
}
.cta p {
margin: 0;
}
.cta1 {
grid-area: cta1;
}
.cta2 {
grid-area: cta2;
}
.price {
font-size: 60px;
font-weight: 300;
}
/* Navigation */
.menu ul {
display: grid;
grid-gap: 10px;
padding: 0;
list-style: none;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}
.menu li a {
display: grid;
grid-template-columns: 1fr;
align-items: center;
min-height: 34px;
background: var(--first);
color: #fff;
font-size: 14px;
}
.menu a {
display: block;
margin: 1px;
text-decoration: none;
padding: 10px;
text-align: center;
color: var(--black);
text-transform: uppercase;
font-size: 20px;
background: white;
box-shadow: 0 0 4px rgba(0,0,0,0.1);
}
.menu a:hover {
background: var(--hover);
color: white;
border-radius: 5px;
transition: ease-out 200ms;
}
[aria-controls="menu-list"] {
display: none;
}
/* Features! */
.features {
display: grid;
grid-gap: 20px;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.feature {
background: white;
padding: 10px;
border: 1px solid white;
text-align: center;
box-shadow: 0 0 4px rgba(0,0,0,0.1);
}
.feature p {
color: rgba(0,0,0,0.5);
}
.icon {
width: 130px;
}
/* webDesign, webHosting, servisRacunara, podrska Section */
.webDesign,
.webHosting,
.servisRacunara,
.podrska {
background: white;
padding: 50px;
min-height: 400px;
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
align-items: center;
justify-items: center;
}
.about {
background: url("assets/images/clouds.png");
}
img.about__mockup {
width: 350px;
}
/* Gallery */
.gallery {
display: grid;
grid-gap: 20px;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}
.gallery img {
width: 100%;
}
/* Counter Statistika */
section.statistika {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
padding: 50px;
background-image: url("assets/images/stats.jpg");
background-size: cover;
background-position: bottom right;
}
.stats {
text-align: center;
font-size: 20px;
color: white;
}
.counter-value{
padding: 0 50px;
text-align: center;
font-size: 70px;
font-weight: 600;
color: white;
}
/* Kontakt */
.kontakt {
display: grid;
grid-template-columns: 1fr 1fr;
text-align: center;
justify-items: center;
align-items: center;
}
footer {
text-align: center;
}
/* Web Dizajn Page */
.website li a {
background: #9e027b;
}
.website a:hover {
background: #c3278b;
}
button.website {
background: #9e027b;
}
button.website:hover {
background: #c3278b;
}
.top-page {
display: grid;
grid-gap: 20px;
grid-template-columns: 1fr;
min-height: 200px;
}
.header-line {
min-height: 200px;
background: url(assets/images/trianglify.svg);
background-size: cover;
background-position: bottom right;
padding: 50px;
color: #000;
}
/* Portfolio section */
.portfolio h2 {
grid-column: 1 / -1;
display: grid;
grid-template-columns: 1fr auto 1fr;
grid-gap: 20px;
align-items: center;
}
.portfolio h2:before, .portfolio h2:after {
display: block;
content: '';
height: 10px;
background: linear-gradient(to var(--direction, left), var(--first), transparent);
}
.portfolio h2:after {
height: 10px;
--direction: right;
}
#media (max-width: 1000px) {
.menu {
order: -1;
perspective: 800px;
}
[aria-controls="menu-list"] {
display: block;
margin-bottom: 10px;
}
.menu ul {
max-height: 0;
overflow: hidden;
transform: rotateX(90deg);
transition: all 0.5s;
}
[aria-expanded="true"] ~ ul {
display: grid;
max-height: 500px;
transform: rotateX(0);
}
[aria-expanded="false"] .close {
display: none;
}
[aria-expanded="true"] .close {
display: inline-block;
}
[aria-expanded="true"]
[aria-expanded="true"] .open {
display: none;
}
}
#media (max-width: 700px) {
.top {
grid-template-areas:
"hero hero"
"cta1 cta2";
margin: 0;
}
.cta {
padding: 20px 0;
}
/* About */
.webDesign,
.webHosting,
.servisRacunara,
.podrska,
.statistika,
.kontakt{
grid-template-columns: 1fr;
}
.about__mockup {
order: -1;
}
section.statistika {
grid-template-columns: 1fr;
}
}
#media (max-width: 500px) {
.top {
grid-template-areas:
"hero"
"cta1"
"cta2"
}
.header-info h1 {
font-size: 34px;
}
.menu {
margin: 0;
}
.cta {
padding: 20px 0;
}
.about__mockup {
order: -1;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Dosis" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<title>iDizajner - Web Dizajn Srbija | Izrada web sajtova, izrada web prodavnica</title>
</head>
<body>
<div class="wrapper">
<div class="top-page">
<header class="header-line">
<nav class="menu website">
<button aria-expanded="false" aria-controls="menu-list" class="website">
<span class="open">Ξ</span>
<span class="close">X</span>
Meni
</button>
<ul id="menu-list">
<li>
Web Dizajn
</li>
<li>
Web Hosting
</li>
<li>
Servis Računara
</li>
<li>
Podrška
</li>
<li>
Kontakt
</li>
</ul>
</nav>
<div class="header-info">
<h1>Web Dizajn</h1>
<p>Budite u korak sa vremenom!</p>
</div>
</header>
</div>
<section class="webDesign about">
<img src="assets/images/icon/webDizajn.svg" alt="" class="about__mockup">
<div class="about about__webDesign">
<h2>WEB DIZAJN</h2>
<p>Neki tekst bi isto trebao da ide ovde ali moze da saceka</p>
<p>Jos jedan tekst nekog obisa</p>
<button id="btn-large">PROČITAJ VIŠE</button>
</div>
</section>
<section class="webHosting">
<div class="about__webHosting">
<h2>WEB HOSTING</h2>
<p>Neki tekst bi isto trebao da ide ovde ali moze da saceka</p>
<p>Jos jedan tekst nekog obisa</p>
<button id="btn-large">PROČITAJ VIŠE</button>
</div>
<img src="assets/images/icon/webHosting.svg" alt="" class="about__mockup">
</section>
<section class="servisRacunara about">
<img src="assets/images/icon/servisRacunara.svg" alt="" class="about__mockup">
<div class="about__servisRacunara">
<h2>SERVIS RAČUNARA</h2>
<p>Neki tekst bi isto trebao da ide ovde ali moze da saceka</p>
<p>Jos jedan tekst nekog obisa</p>
<button id="btn-large">PROČITAJ VIŠE</button>
</div>
</section>
<section class="podrska">
<div class="about__podrska">
<h2>PODRŠKA</h2>
<p>Neki tekst bi isto trebao da ide ovde ali moze da saceka</p>
<p>Jos jedan tekst nekog obisa</p>
<button id="btn-large">PROČITAJ VIŠE</button>
</div>
<img src="assets/images/icon/podrska.svg" alt="" class="about__mockup">
</section>
<section class="statistika">
<div class="stats">
<div class="counter-value" data-count="39">0</div>
Klijenti
</div>
<div class="stats">
<div class="counter-value" data-count="77">0</div>
Projekti
</div>
<div class="stats">
<div class="counter-value" data-count="3">0</div>
Partner Agencije
</div>
</section>
<section class="kontakt">
<img src="assets/images/kontakt.png" alt="">
<div class="naruci">
<h3>Potreban vam je web sajt?</h3>
<a href="#">
<button id="btn-large">NARUČI ODMAH</button>
</a>
</div>
</section>
<footer>
<p>iDizajner 2018</p>
</footer>
</div>
<script>
const navButton = document.querySelector('button[aria-expanded]');
function toggleNav({ target }) {
const expanded = target.getAttribute('aria-expanded') === 'true' || false;
navButton.setAttribute('aria-expanded', !expanded);
}
navButton.addEventListener('click', toggleNav);
// counter statistika
var a = 0;
$(window).scroll(function() {
var oTop = $('.statistika').offset().top - window.innerHeight;
if (a == 0 && $(window).scrollTop() > oTop) {
$('.counter-value').each(function() {
var $this = $(this),
countTo = $this.attr('data-count');
$({
countNum: $this.text()
}).animate({
countNum: countTo
},
{
duration: 6000,
easing: 'swing',
step: function() {
$this.text(Math.floor(this.countNum));
},
complete: function() {
$this.text(this.countNum);
//alert('finished');
}
});
});
a = 1;
}
});
</script>
</body>
</html>

You need to remove some margin on the different sections. It works with 10px:
.top, .menu, .features, .webDesign, .webHosting, .servisRacunara, .podrska {
margin: 10px;
font-size: 15px;
}
It happens because you have an image with width that expands content on mobile resolution:
<img src="assets/images/icon/webDizajn.svg" alt="" class="about__mockup">

Related

White space on the right side of the page below 400px device screen width. How to make it disappear?

I have two big problems:
The first trouble I have encountered is that when I am testing the responsivity of my website in the contact section I always meet a reappearing problem: There is a white space (.2 rem - 1.2rem width) on the right side of the body when I try to display the whole page under 400px width device.
My second problem is that I have social media icons in the footer. They appear properly in all other sections (multipage website), but only here does something prevent them to be displayed properly. I tried resizing their main divs to 100% width and 100% max-width, but an element is probably still longer than the others, which should obviously cause this kind of problem.
So about the white blank area, I think it is important to know that I have a specially styled scrollbar, which might also cause this little mischief. I am unsure, so I have also tried removing it, but it did not help. In the beginning, I also encountered the same problem with the footer, but somehow I managed to get by and was able to solve it by correcting the width of the .footer-container. Since then the white space appeared and my second problem with social media icons not being displayed properly just arose.
Here is my code:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="contacts.css">
<title>Eckert Művek Galéria</title>
</head>
<body>
<div class="floating-btn show-btn" aria-label="up button" role="button">
<img src="assets/svg_files/chevron-up-solid.svg" alt="up img" />
</div>
<header>
<!--NAVBAR-->
<nav>
<ul class="menu" id="desktop-menu">
<li class="nav-item">Főoldal</li>
<li class="nav-item">Rólunk</li>
<li class="nav-item">Szolgáltatások</li>
<li class="nav-item">Miért mi?</li>
<li class="nav-item">Galéria</li>
<li class="nav-item">Kapcsolat</li>
</ul>
<!--HAMBURGER ICON-->
<div class="header-right-gap">
<button class="hamburger" aria-label="hamburger button">
<div class="line line-1"></div>
<div class="line line-2"></div>
<div class="line line-3"></div>
</button>
</div>
</nav>
<!--MOBILE MENU-->
<div class="mobile-menu">
<ul class="m-menu">
<li class="nav-item">Főoldal</li>
<li class="nav-item">Rólunk</li>
<li class="nav-item">Szolgáltatások</li>
<li class="nav-item">Miért mi?</li>
<li class="nav-item">Galéria</li>
<li class="nav-item">Kapcsolat</li>
</ul>
</div>
</header>
<main>
<!--CONTACT FORM-->
<div class="container">
<form>
<h1>Kapcsolat</h1>
<input type="text" id="firstName" placeholder="Családnév" required>
<input type="text" id="lastName" placeholder="Keresztnév" required>
<input type="email" id="email" placeholder="Email" required>
<input type="text" id="mobile" placeholder="Telefonszám" required>
<h4 class="contactus">Lépjen velünk kapcsolatba!</h4>
<textarea id="texti" required></textarea>
<input type="submit" value="Elküldés" id="button">
</form>
</div>
</main>
<footer>
<div class="footer-container">
<!--COMPANY INFORMATION, CONTATCTS-->
<div class="footer-top">
<div>
<article>
<h2>Elérhetőségeink</h2>
<div class="cellphone">
<img src="assets/png/telephone.png" alt="phone-icon">
<h3><span>Telefonszám:</span> +36709424298</h3>
</div>
<div class="internet">
<img src="assets/png/mail.png" alt="email-icon">
<h3><span>E-mail:</span> eckertmuvek#gmail.com</h3>
</div>
<div class="headquarter">
<img src="assets/png/location.png" alt="company-icon">
<h3><span>Telephely:</span> Budapest, 1182 Török Bálint u. 16/b</h3>
</div>
<div class="opening-hours">
<img src="assets/png/clock.png" alt="op-icon">
<h3><span>Nyitvatartási idő:</span> hétfő - péntek(7:00 - 17:30)</h3>
</div>
</article>
</div>
<!--TEXT-->
<div class="text-container">
<h4>Céginformációk</h4>
<p>
<ol>
<li>
<h5>Cégjegyzékszám: </h5>
<p> 01 09 996342</p>
</li>
<li>
<h5>Adószám: </h5>
<p>24222716243</p>
</li>
<li>
<h5>Számlaszám: </h5>
<p>112131423-43242142-432412421</p>
</li>
<li>
<h5>Cégnév: </h5>
<p>Eckert Művek Korlátolt Felelősségű Társaság</p>
</li>
</ol>
</p>
</div>
<!--
<div class="text-container">
<h4>Ttitle-1</h4>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.
Dicta modi laborum quibusdam quis natus debitis qui dolor
voluptatibus ab sit, cum saepe enim unde doloribus veniam
numquam perspiciatis optio impedit.</p>
</div>
-->
<!--POLICIES-->
<div class="policies">
Impresszum
GDPR Tájékoztató
Süti Tájékoztató
</div>
</div>
<!--MAP-->
<div class="map">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2699.366130757782!2d19.217992451587673!3d47.42430370844346!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x4741c1f21fa88e89%3A0x44673b68b84b51c9!2zQnVkYXBlc3QsIFTDtnLDtmsgQsOhbGludCB1LiAxNmIsIDExODI!5e0!3m2!1shu!2shu!4v1672662477180!5m2!1shu!2shu"
height="400" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
<!--SOCIAL MEDIA ICONS-->
<div class="social-media-icons">
<div class="sm-container" id="insta">
<div class="sm-icon">
</div>
</div>
<div class="sm-container" id="github">
<div class="sm-icon">
</div>
</div>
<div class="sm-container" id="facebook">
<div class="sm-icon">
</div>
</div>
<div class="sm-container" id="linkedin">
<div class="sm-icon">
</div>
</div>
</div>
<div class="footer-bottom">
<p>© Eckert Művek Kft. Minden jog fenntartva.</p>
</div>
</div>
</footer>
<script src="contacts.js"></script>
</body>
</html>
And here is my CSS code:
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#100;200;300;400;500;600;700;800;900&display=swap');
:root {
--nav-height: 100px; /*80%*/
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
}
html {
scroll-behavior: smooth;
}
body {
min-height: 100vh;
width: 100%;
font-size: 12px;
font-family: sans-serif;
}
.floating-btn {
position: fixed;
bottom: 3.5vh;
right: 0;
width: 50px;
height: 50px;
z-index: 100;
background-color: yellow;
border-radius: 50%;
padding: 10px;
box-shadow: 0 0 5px hsla(0, 0%, 0%, hsla(0,0%,0%,0.5));
cursor: pointer;
margin-right: 1rem;
border: 1px solid #000;
}
.show-btn {
display: block;
}
header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100px;
z-index: 100;
background-color: #000;
}
/*Srcollbar*/
::-webkit-scrollbar{
width: 15px;
background: #000;
}
::-webkit-scrollbar-thumb {
background: yellow;
border-radius: 10px;
border: 1px solid black;
}
::-webkit-scrollbar-thumb:active {
background: orangered;
}
nav {
display: flex;
width: min(90%, 1200px);
height: inherit;
align-items: center;
justify-content: flex-start;
margin-inline: unset;
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 20px;
left: 2.5rem;
gap: 1rem;
/*margin-top: -2.5rem;*/
}
nav a {
max-height: var(--nav-height);
align-items: center;
margin-inline: auto;
font-size: 20px;
position: relative;
height: 100%;
}
nav ul {
display: flex;
gap: 1rem;
width: 100%;
list-style: none;
margin-top: 3rem;
}
.nav-item a {
color: white;
text-transform: uppercase;
text-decoration: none;
font-weight: bold;
font-size: 20px;
height: 100%;
margin: .5em .8em;
padding: 10px;
}
.nav-item a::before,
.nav-item a::after {
content: '';
height: 14px;
width: 14px;
position: absolute;
transition: all .35s ease;
opacity: 0;
}
nav a::before {
content: '';
right: 0;
top: 0;
border-top: 3px solid #ffed4b;
border-right: 3px solid #fdcd3b;
transform: translate(-100%, 50%); /*-100%, 50%*/
}
.nav-item a:after {
content: '';
left: 0;
bottom: 0;
border-bottom: 3px solid #fdcd3b;
border-left: 3px solid #ffed4b;
transform: translate(100%, -50%); /*100%, -50%*/
}
.nav-item a:hover:before,
.nav-item a:hover:after{
transform: translate(0,0);
opacity: 1;
}
.nav-item a:hover {
text-decoration: underline;
color:yellow;
}
.container{
min-height: 100vh;
width: 99.vw;
background: #08071d;
display: flex;
justify-content: center;
align-items: center;
background: url("assets/images/mainpage/106811484-1608045351058-gettyimages-1126750618-dsc_1540.jpeg") no-repeat center center/cover;
}
.container form{
width: 670px; /*670px*/
height: 450px;
display: flex;
justify-content: center;
box-shadow: 20px 20px 50px rgba(0,0,0,0.5);
border-radius: 15px;
background: rgba(255,255,255,0.1);
backdrop-filter: blur(10px);
flex-wrap: wrap;
overflow-x: hidden;
}
.container form h1{
color: #fff;
font-weight: 500;
margin-top: 20px;
width: 500px;
text-align: center;
}
.container form input{
width: 290px;
height: 40px;
padding-left: 10px;
outline: none;
border: none;
font-size: 25px;
margin-bottom: 10px;
background: none;
border-bottom: 2px solid #fff;
}
.container form input::placeholder{
color: #ddd;
}
.container form #lastName,
.container form #mobile{
margin-left: 20px;
}
.container form h4{
color: #fff;
font-weight: 300;
width: 600px;
margin-top: 20px;
}
.container form textarea{
background: none;
border: none;
border-bottom: 2px solid #fff;
color: #fff;
font-weight: 200;
font-size: 25px;
padding: 10px;
outline: none;
min-width: 600px;
max-width: 600px;
min-height: 80px;
max-height: 80px;
}
.contactus {
font-size: 18px;
}
input[type="text"]:focus, input[type="email"]:focus, #texti:focus {
border-bottom: 3px solid #fdcd3b;
}
textarea::-webkit-scrollbar{
width: 1em;
}
textarea::-webkit-scrollbar-thumb{
background-color: rgba(194,194,194,0.713);
}
.container form #button{
border: 1px solid;
background: transparent;
border-radius: 50px;
margin-top: 20px;
font-weight: 600;
font-size: 20px;
color: #fff;
width: 100px;
padding: 0;
margin-right: 500px;
margin-bottom: 30px;
transition: 0.3s;
}
.container form #button:hover{
opacity: 0.9;
transform: scale(1.2);
background-color: black;
color: yellow;
}
/*FOOTER*/
footer {
width: 100%;
background-color: #000;
padding-block: 4rem;
color: white;
}
.footer-container {
display: flex;
flex-direction: column;
justify-content: space-between;
margin-inline: auto;
width: min(90%, 1200px);
}
.footer-top {
width: 100%;
height: 100%;
color: #fff;
font-size: 10px;
display: flex;
justify-content: space-around;
}
.footer-top h2 {
text-align: center;
justify-content: center;
align-items: center;
}
.footer-top article div {
line-height: 2.5rem;
}
.footer-top article div:first-of-type {
margin-top: 1rem;
}
.footer-top img {
height: 64px;
}
.text-container p {
margin-top: 2rem;
}
.text-container ol li {
line-height: 1.5rem;
}
/*CONTACT ICONS*/
.cellphone img, .internet img, .headquarter img, .opening-hours img{
background-color: yellow;
border-radius: 50px;
transition: all 0.3s linear;
}
footer img:hover {
background-color: orangered;
border-radius: 40px;
transform: rotate(-360deg);
}
.footer-bottom {
text-align: center;
margin-top: 2rem;
}
span {
color: yellow;
}
.text-container {
justify-content: space-between;
width: 20vw;;
font-size: 0.8rem;
}
/*POLICIES LINKS*/
.policies {
display: flex;
flex-direction: column;
font-size: 14px;
text-transform: uppercase;
}
.policies a {
color: yellow;
font-size: 10px;
line-height: 2rem;
}
.policies a:hover {
color: orangered;
}
/*MAP*/
.map {
margin-inline: auto;
}
/*SOCIAL MEDIA ICONS*/
.social-media-icons {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.sm-container {
display: flex;
justify-content: center;
gap: 2rem;
padding:1rem;
border: 1px black;
width: 100%;
height: 100%;
}
.sm-container a:active {
color: yellow;
}
.fa {
border-radius: 50%;
width: 100%;
height: 100%;
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: 30px;
/**/
}
.fa-instagram {
background: #125688;
color: white;
padding: 1rem;
}
.fa-github {
background: white;
color: black;
padding: 1rem;
}
.fa-facebook {
background: #4267B2;
color: white;
padding: 1rem;
}
.fa-linkedin {
background: #3B5998;
color: white;
padding: 1rem;
}
.sm-icon {
transition: all 0.3s linear;
}
.sm-icon:hover {
transform: scale(1.2);
}
.fa:hover {
background-color: #fdcd3b;
}
/*MOBILE MENU*/
.mobile-menu {
display: none;
}
.mobile-menu {
display: flex;
width: 100%; /*.line a szülő tehát 40px a width*/
height: calc(100vh - 80px);
align-items: center;
justify-content: center;
position: absolute;
top: 80px;
left: 0;
background-color: black;
transform: translate(-100%);
transition: all 0.4s ease;
z-index: 100;
}
.mobile-menu-on {
display: flex; /**/
transform: translate(0);
}
.m-menu {
display: flex;
flex-direction: column;
gap: 2rem;
text-align: center;
font-size: 1.4rem;
}
/*hamburger icon*/
.header-right-gap {
width: 100px;
margin-left: 2rem;
}
.hamburger {
display: none;
position: fixed;
width: 50px;
height: 50px;
border: none;
background-color: transparent;
top: 0;
left: 1;
margin-top: 1.5rem;
}
.hamburger:hover {
border: 6px solid;
border-color: yellow;
width: 43px;
margin-left: 4px;
transform: scale(1.2);
}
.hamburger:hover .line.line-1 {
/*display: none;*/
transform: rotate(45deg) translateY(7.5px);
background-color: yellow;
}
.hamburger:hover .line.line-2 {
display: none;
}
.hamburger:hover .line.line-3 {
/*display: none;*/
transform: rotate(-45deg) translateY(-7.5px);
background-color: yellow;
}
.line {
transition: all .4s ease;
width: 40px;
height: 5px;
background-color: white;
margin-block: 5px;
border-radius: 10px;
}
/*Media query*/
#media (max-width: 1200px) {
.hamburger {
display: block;
}
#desktop-menu {
display: none;
}
}
#media (max-width: 900px) {
footer nav ul {
flex-direction: column;
}
footer nav ul li a {
font-size: 15px;
/*padding: 15px;*/
}
}
#media (max-width: 750px) {
.footer-container {
display: flex;
flex-wrap: wrap;
}
footer nav ul li a {
font-size: 10px;
padding: 15px;
}
.text-container p {
font-size: 10px;
}
}
#media (max-width: 600px) {
.container form {
width: 470px;
}
.container form input {
width: 160px;
}
.container form #button, .container form h4 {
margin-inline: auto;
}
.container form textarea {
min-width: 300px;
max-width: 300px;
}
}
#media (max-width: 400px) {
.container {
max-width: 100%;
height: 100%;
overflow: hidden;
}
.container form {
max-width: 100%;
padding-top: 40px;
padding-bottom: 10px;
}
.container form input, h4 {
text-align: center;
}
.container form input {
width: 160px;
}
.container form #button, .container form h4 {
margin-inline: auto;
}
.container form textarea {
align-items: center;
min-width: 300px;
max-width: 300px;
}
.text-container {
width: 70vw;
}
.container form #button {
display: flex;
flex-direction: column;
}
footer {
width: 400px;
}
.footer-top {
display: flex;
flex-direction: column;
align-items: center;
}
}
I once had a similar problem and it was due to margin of one element being bigger than it should be, and it just made that div bigger and pushed it out of viewport, so you could check your margins, I can see that you have quite a lot of margins, inline and to margin-right as well.

CSS Grid: side menu bar after collapse dose not change second column width automatically

I am learning CSS grid and I have a simple .container grid with 3 rows (header, navbar , footer).
.navbar grid area have a .sidebar and .main grid areas .
I want to click on a hidden check box and change the width of sidebar grid area and want that main grid area automatically takes the remaining width
.container {
display: grid;
height: 100vh;
grid-template-rows: 10% auto ;
grid-template-columns: 1fr;
grid-template-areas:
"header"
"navbar"
"footer";
}
.header {
grid-area: header;
border: none;
grid-gap: 0.1rem;
background-color: var(--dark-blue);
display: grid;
grid-template-columns: 10% 30% 60%;
color: var(--white);
align-content: center;
}
.navbar
{
grid-area: navbar;
display: grid;
grid-template-rows: repeat(1);
grid-template-columns: var(--side-menu-width) auto;
grid-template-areas:"sidebar main"
}
.sidebar {
display: grid;
grid-area: sidebar;
grid-template-rows: 15% 65% 20%;
background: var(--dark-blue);
border:none;
}
.checkbox:checked ~ .sidebar {
left: 8rem;
width: 5rem;
}
:root {
--font-size: 16px;
--unit: 1rem;
--font-family: Segoe UI, Tahoma, Verdana, sans-serif;
--font-weight: normal;
--font-color: #212529;
--white: #fff;
--primary-color: #0076d6;
--primary-hover: #005ea2;
--secondary-color: #71767a;
--secondary-hover: #565c65;
--danger-color: #b50909;
--danger-hover: #8b0a03;
--success-color: #146947;
--success-hover: #105439;
--warning-color: #ffbe2e;
--dark-gray: #3d4551;
--medium-gray: #a9aeb1;
--light-gray: #dfe1e2;
--pale-gray-base: #edeff0;
--pale-gray-4: #f1f3f6;
--pale-gray-3: #f5f6f7;
--pale-blue: #e8f5ff;
--light-blue: #cfe8ff;
--dark-blue: #0b4778;
--light-indigo: #dee5ff;
--pale-indigo: #edf0ff;
--pale-red: #fff3f2;
--gold: #ffbe2e;
--light-gold: #ffe396;
--pale-gold: #fef0c8;
--light-green: #c7efe2;
--pale-green: #e0f7f6;
--fast-transition: 0.3s;
--normal-transition: 0.5s;
--slow-transition: 0.7s;
--strong-box-shadow: 4px 4px 4px #0000001a;
--default-box-shadow: 4px 4px 4px #0000000f;
--subtle-box-shadow: 2px 2px 4px #00000008;
--reduce-drag-menu: 0px;
--reduce-main-menu: 0px;
--reduce-submenu: 0px;
--side-submenu-width: 270px;
--side-menu-width: 16rem;
--side-drag-width: 20px;
--top-nav-height: 20px;
}
html {
font-size: 62.5%;
box-sizing: border-box;
}
body {
margin-left: 1rem;
margin-right:1rem;
margin-top: 0;;
padding: 0;
font-family: 'Montserrat', sans-serif;
}
.container {
display: grid;
height: 100vh;
grid-template-rows: 10% auto ;
grid-template-columns: 1fr;
grid-template-areas:
"header"
"navbar"
"footer";
}
.container div {
border: var(--strong-box-shadow) solid;
}
/* Header */
.header {
grid-area: header;
border: none;
grid-gap: 0.1rem;
background-color: var(--dark-blue);
display: grid;
grid-template-columns: 10% 30% 60%;
color: var(--white);
align-content: center;
}
.navbar
{
grid-area: navbar;
display: grid;
grid-template-rows: repeat(1);
grid-template-columns: var(--side-menu-width) auto;
grid-template-areas:"sidebar main"
}
.sidebar {
display: grid;
grid-area: sidebar;
grid-template-rows: 15% 65% 20%;
background: var(--dark-blue);
border:none;
}
.social-icons-list{
list-style: none;
padding-left: 1rem;
padding-right: 1rem;
height: 35rem;
}
.social-link-listitem{
font-size: 1.2rem;
text-decoration: none;
border-radius: 1rem;
}
.social-link-listitem:hover{
background: var(--light-indigo);
color: var(--dark-blue);
}
.social-link{
color: var(--white);
transition: color .4s ease;
}
.social-link:hover
{
color: var(--dark-blue);
}
.social-link i{
min-width: 3rem;
border-radius: 1rem;
line-height: 5rem;
text-align: center;
border-radius: 12px;
}
.social-link-listitem .tooltip
{
position: absolute;
transform: translateY(-50%);
text-align: center;
border-radius: .5rem;
height: 3rem;
align-items: center;
background: var(--white);
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
left: 12rem;
transition: 0s;
width: var(--side-menu-width);
opacity: 0;
pointer-events: none;
}
.social-link-listitem:hover .tooltip
{
transition: all .5s ease;
opacity: 1;
}
/* Profile setting*/
.profile_content
{
grid-row: 3;
color : var(--white);
height: 4rem;
padding-left: 2rem;
}
.profile_content .profile .profile_details{
display: grid;
grid-template-columns: 30% 70%;
grid-template-rows: 1;
}
.profile_content .profile .profile_img{
object-fit: cover;
border-radius: 1rem;
color: var(--white);
}
.main {
grid-area: main;
background:#105439;
}
.footer {
grid-area: footer;
background:#0076d6;
}
.header-icon {
text-align: center;
}
.header-text{
font-size: 1rem;
text-align: left;
margin: auto;
}
.header-confidential{
font-size: 1rem;
text-align: center;
margin: auto;
}
.user-image {
margin: auto;
display: block;
text-align: center;
border-radius: 10px;
}
/* end of Header */
.menu-icon{
cursor: pointer;
margin-top: 3rem;
padding-left: 2rem;
}
.menu-icon:hover .line{
width: 2.5rem;
}
.line{
height: .2rem;
width: 2.5rem;
background-color: #fff;
margin-bottom: .6rem;
}
.line-1 , .line-3
{
width: 1.8rem;
transition: all .3s;
}
.checkbox:checked ~ .sidebar {
left: 8rem;
width: 5rem;
}
.checkbox:checked ~ .main {
width: 5rem;
}
.checkbox:checked ~ .sidebar .line-1 {
transform: rotate(-405deg) translate(-5px, 6px);
width: 2.5rem;
}
.checkbox:checked ~ .sidebar .line-2 {
opacity: 0;
}
.checkbox:checked ~ .sidebar .line-3 {
transform: rotate(405deg) translate(-5px, -6px);
width: 2.5rem;
}
/* end navbar */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SIR Data Preparation</title>
<link rel="shortcut icon" type="image/png" href="./images/iaea_small.png" >
<link rel="stylesheet" href="css/sir-style1.css">
<link rel="stylesheet" href="css/all.min.css">
</head>
<body>
<div class="container">
<div class="header"> <div class="header-icon">
<img src="./images/iaea_small.png" alt>
</div>
<div class="header-text">SIR Data Preparation</div>
<div class="header-confidential">HIGHLY CONFIDENTIAL</div>
</div>
<!-- navbar -->
<div class="navbar">
<input type="checkbox" class="checkbox" id="click" hidden>
<!-- sidebar -->
<div class="sidebar">
<label for="click">
<div class="menu-icon">
<div class="line line-1"></div>
<div class="line line-2"></div>
<div class="line line-3"></div>
</div>
</label>
<ul class="social-icons-list">
<li class="social-link-listitem">
<i class="fas fa-house-user"></i>Dashboard
<span class="tooltip">Dashboard</span>
</li>
<li class="social-link-listitem">
<i class="fas fa-file-excel"></i>Worksheets
<span class="tooltip">Worksheets</span>
</li>
<li class="social-link-listitem">
<i class="fas fa-signal"></i>Live Dashboard
<span class="tooltip">Live Dashboard</span>
</li>
<li class="social-link-listitem">
<i class="fas fa-clock"></i>Scheduler
<span class="tooltip">Scheduler</span>
</li>
<li class="social-link-listitem">
<i class="fas fa-users-cog"></i>Settings
<span class="tooltip">Settings</span>
</li>
<li class="social-link-listitem">
<i class="fab fa-hire-a-helper"></i>Help
<span class="tooltip">Help</span>
</li>
</ul>
<div class="profile_content">
<div class="profile">
<div class="profile_details">
<img class="profile_img" src="./images/iaea_small.png"/>
<div class="name_job">
<div class="name">Yashveer Singh</div>
<div class="job">Developer</div>
</div>
</div>
</div>
</div>
</div>
<div class="main">Main</div>
<!-- end of sidebar -->
</div>
<div class="footer">Footer</div>
</div>
</body>
</html>
grid-template-columns: 1fr;
grid-template-areas:
"header"
"navbar"
"footer";
}
.header {
grid-area: header;
border: none;
grid-gap: 0.1rem;
background-color: var(--dark-blue);
display: grid;
grid-template-columns: 10% 30% 60%;
color: var(--white);
align-content: center;
}
.navbar
{
grid-area: navbar;
display: grid;
grid-template-rows: repeat(1);
grid-template-columns: var(--side-menu-width) auto;
grid-template-areas:"sidebar main"
}
.sidebar {
display: grid;
grid-area: sidebar;
grid-template-rows: 15% 65% 20%;
background: var(--dark-blue);
border:none;
}
.checkbox:checked ~ .sidebar {
left: 8rem;
width: 5rem;
}
I edited your snippet, there was some little issues so your code couldn't work:
You specified a fixed width when creating you columns then you tried to resize them, a column with a fixed width of height need an override of the grid-template-rows and / or grid-template-columns to work.
Since we needed to update the value of grid-template-columns the button need to be sibbling not child of the navbar div.
But you where close to something that work, here is the reworked version :
:root {
--font-size: 16px;
--unit: 1rem;
--font-family: Segoe UI, Tahoma, Verdana, sans-serif;
--font-weight: normal;
--font-color: #212529;
--white: #fff;
--primary-color: #0076d6;
--primary-hover: #005ea2;
--secondary-color: #71767a;
--secondary-hover: #565c65;
--danger-color: #b50909;
--danger-hover: #8b0a03;
--success-color: #146947;
--success-hover: #105439;
--warning-color: #ffbe2e;
--dark-gray: #3d4551;
--medium-gray: #a9aeb1;
--light-gray: #dfe1e2;
--pale-gray-base: #edeff0;
--pale-gray-4: #f1f3f6;
--pale-gray-3: #f5f6f7;
--pale-blue: #e8f5ff;
--light-blue: #cfe8ff;
--dark-blue: #0b4778;
--light-indigo: #dee5ff;
--pale-indigo: #edf0ff;
--pale-red: #fff3f2;
--gold: #ffbe2e;
--light-gold: #ffe396;
--pale-gold: #fef0c8;
--light-green: #c7efe2;
--pale-green: #e0f7f6;
--fast-transition: 0.3s;
--normal-transition: 0.5s;
--slow-transition: 0.7s;
--strong-box-shadow: 4px 4px 4px #0000001a;
--default-box-shadow: 4px 4px 4px #0000000f;
--subtle-box-shadow: 2px 2px 4px #00000008;
--reduce-drag-menu: 0px;
--reduce-main-menu: 0px;
--reduce-submenu: 0px;
--side-submenu-width: 270px;
--side-menu-width: 16rem;
--side-menu-width-reduced: 5rem;
--side-drag-width: 20px;
--top-nav-height: 20px;
}
html {
font-size: 62.5%;
box-sizing: border-box;
}
body {
margin-left: 1rem;
margin-right:1rem;
margin-top: 0;;
padding: 0;
font-family: 'Montserrat', sans-serif;
}
.container {
display: grid;
height: 100vh;
grid-template-rows: 10% auto ;
grid-template-columns: 1fr;
grid-template-areas:
"header"
"navbar"
"footer";
}
.container div {
border: var(--strong-box-shadow) solid;
}
/* Header */
.header {
grid-area: header;
border: none;
grid-gap: 0.1rem;
background-color: var(--dark-blue);
display: grid;
grid-template-columns: 10% 30% 60%;
color: var(--white);
align-content: center;
}
.navbar
{
grid-area: navbar;
display: grid;
grid-template-rows: repeat(1);
grid-template-columns: var(--side-menu-width) 1fr;
grid-template-areas:"sidebar main"
}
.sidebar {
display: grid;
grid-area: sidebar;
grid-template-rows: 15% 65% 20%;
background: var(--dark-blue);
border:none;
}
.social-icons-list{
list-style: none;
padding-left: 1rem;
padding-right: 1rem;
height: 35rem;
}
.social-link-listitem{
font-size: 1.2rem;
text-decoration: none;
border-radius: 1rem;
}
.social-link-listitem:hover{
background: var(--light-indigo);
color: var(--dark-blue);
}
.social-link{
color: var(--white);
transition: color .4s ease;
}
.social-link:hover
{
color: var(--dark-blue);
}
.social-link i{
min-width: 3rem;
border-radius: 1rem;
line-height: 5rem;
text-align: center;
border-radius: 12px;
}
.social-link-listitem .tooltip
{
position: absolute;
transform: translateY(-50%);
text-align: center;
border-radius: .5rem;
height: 3rem;
align-items: center;
background: var(--white);
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
left: 12rem;
transition: 0s;
width: var(--side-menu-width);
opacity: 0;
pointer-events: none;
}
.social-link-listitem:hover .tooltip
{
transition: all .5s ease;
opacity: 1;
}
/* Profile setting*/
.profile_content
{
grid-row: 3;
color : var(--white);
height: 4rem;
padding-left: 2rem;
}
.profile_content .profile .profile_details{
display: grid;
grid-template-columns: 30% 70%;
grid-template-rows: 1;
}
.profile_content .profile .profile_img{
object-fit: cover;
border-radius: 1rem;
color: var(--white);
}
.main {
grid-area: main;
background:#105439;
}
.footer {
grid-area: footer;
background:#0076d6;
}
.header-icon {
text-align: center;
}
.header-text{
font-size: 1rem;
text-align: left;
margin: auto;
}
.header-confidential{
font-size: 1rem;
text-align: center;
margin: auto;
}
.user-image {
margin: auto;
display: block;
text-align: center;
border-radius: 10px;
}
/* end of Header */
.menu-icon{
cursor: pointer;
margin-top: 3rem;
padding-left: 2rem;
}
.menu-icon:hover .line{
width: 2.5rem;
}
.line{
height: .2rem;
width: 2.5rem;
background-color: #fff;
margin-bottom: .6rem;
}
.line-1 , .line-3
{
width: 1.8rem;
transition: all .3s;
}
.checkbox:checked ~ .navbar {
grid-template-columns: var(--side-menu-width-reduced) 1fr;
}
.checkbox:checked ~ .sidebar .line-1 {
transform: rotate(-405deg) translate(-5px, 6px);
width: 2.5rem;
}
.checkbox:checked ~ .sidebar .line-2 {
opacity: 0;
}
.checkbox:checked ~ .sidebar .line-3 {
transform: rotate(405deg) translate(-5px, -6px);
width: 2.5rem;
}
/* end navbar */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SIR Data Preparation</title>
<link rel="shortcut icon" type="image/png" href="./images/iaea_small.png" >
<link rel="stylesheet" href="css/sir-style1.css">
<link rel="stylesheet" href="css/all.min.css">
</head>
<body>
<div class="container">
<div class="header"> <div class="header-icon">
<img src="./images/iaea_small.png" alt>
</div>
<div class="header-text">SIR Data Preparation</div>
<div class="header-confidential">HIGHLY CONFIDENTIAL</div>
</div>
<!-- navbar -->
<input type="checkbox" class="checkbox" id="click" hidden>
<div class="navbar">
<!-- sidebar -->
<div class="sidebar">
<label for="click">
<div class="menu-icon">
<div class="line line-1"></div>
<div class="line line-2"></div>
<div class="line line-3"></div>
</div>
</label>
<ul class="social-icons-list">
<li class="social-link-listitem">
<i class="fas fa-house-user"></i>Dashboard
<span class="tooltip">Dashboard</span>
</li>
<li class="social-link-listitem">
<i class="fas fa-file-excel"></i>Worksheets
<span class="tooltip">Worksheets</span>
</li>
<li class="social-link-listitem">
<i class="fas fa-signal"></i>Live Dashboard
<span class="tooltip">Live Dashboard</span>
</li>
<li class="social-link-listitem">
<i class="fas fa-clock"></i>Scheduler
<span class="tooltip">Scheduler</span>
</li>
<li class="social-link-listitem">
<i class="fas fa-users-cog"></i>Settings
<span class="tooltip">Settings</span>
</li>
<li class="social-link-listitem">
<i class="fab fa-hire-a-helper"></i>Help
<span class="tooltip">Help</span>
</li>
</ul>
<div class="profile_content">
<div class="profile">
<div class="profile_details">
<img class="profile_img" src="./images/iaea_small.png"/>
<div class="name_job">
<div class="name">Yashveer Singh</div>
<div class="job">Developer</div>
</div>
</div>
</div>
</div>
</div>
<div class="main">Main</div>
<!-- end of sidebar -->
</div>
<div class="footer">Footer</div>
</div>
</body>
</html>
Check the diff to better understand the modifications : https://www.diffchecker.com/qamU3z5W (1 month available online)

Flexbox Footer Wrap Not Expanding

I am trying to set up my flexbox for responsiveness and accessibility. However as can be seen in the attached images, for some reason text is lost when reducing screen size.
Image of webpage at full size
Image of reduced size & clashing elements
/* Footer Styling Definitions */
footer {
display: flex;
flex-direction: row;
margin-top: 0px;
text-align: center;
background-color: black;
color: aliceblue;
}
#footer_left {
flex: 1;
padding-left: 5px;
}
#footer_centre {
flex: 1;
padding-left: 5px;
}
#footer_right {
flex: 1;
padding-left: 5px;
position: relative;
}
.logo_footer {
padding-top: 10px;
padding-bottom: 10px;
}
.legal {
margin: 0;
padding-top: 5px;
position: absolute;
top: 90%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.legal_stuff {
text-decoration: none;
color: white;
}
.privacy_policy {
text-decoration: none;
color: white;
}
.privacy_policy:hover {
font-weight: bold;
}
.legal_stuff:hover {
font-weight: bold;
}
#media screen and (max-width: 1024px) {
section {
width: 100%;
}
}
#media screen and (max-width: 800px) {
nav {
width: 100%;
}
section {
flex-direction: column;
}
aside {
display: none;
}
nav ul {
flex-direction: column;
}
form {
margin: 0 auto;
flex-direction: column;
}
.label {
text-align: left;
}
footer {
flex-direction: column;
}
}
I would love some assistance - sorry I am just new to web development so I am trying to learn as much as I can.
I think it can help you.
This is my screenshot image.
#charset "UTF-8";
/* CSS Document */
#import url('https://fonts.googleapis.com/css2?family=Baloo+2&family=Comfortaa&family=Shadows+Into+Light&display=swap');
body {
font-size: 100%;
line-height: 1.5;
margin: 0;
padding: 0;
font-family: 'Baloo 2', cursive;
/*font-family: 'Comfortaa', cursive;*/
height: 100vh;
}
p {
margin: auto;
text-align: center;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
h1 {
}
h2 {
text-align: center;
font-size: 2em;
margin-bottom: auto;
margin-top: auto;
}
/* Navigation Styling Definitions */
nav {
width: 100%;
top: 0;
position: fixed;
background-color: rgba(255,255,255,0.70);
z-index: 101;
}
nav ul {
display: flex;
}
nav li {
flex: 1;
display: inline;
list-style-type: none;
text-align: center;
}
nav a {
text-decoration: none;
color: black;
}
nav a:hover {
text-decoration: overline underline;
color: darkslategray;
}
/* Header Styling Definitions */
header {
background-image: url("images/sunset-1645103.jpeg");
position: relative;
width: 100%;
height: 200px;
background-position: center;
margin-top: 55px;
}
.logo_header {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
/* Section Styling Definitions */
section {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
width: 100%;
margin: 0 auto;
}
.phone {
text-decoration: none;
color: black;
}
.phone:hover {
color: darkslategray;
}
.call_img {
width: 40px;
height: 40px;
padding-bottom: -10px;
}
/* Aside Styling Definitions */
aside {
flex: 1;
background-color: blue;
}
/* Article Styling Definitions */
article {
display: flex;
flex: 3;
background-color: transparent;
}
#article_left {
flex: 1;
align-content: center;
margin-right: auto;
background-color: aqua;
}
#article_right {
flex: 1;
align-content: center;
justify-content: center;
padding-bottom: 5px;
background-color: transparent;
margin-left: auto;
}
.cta {
flex: 30;
border: 1px solid black;
border-radius: 5px;
margin: 25px;
padding-left: 5px;
}
form {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
margin: 0 auto;
width: 80%;
}
.input-box {
padding-right: 5px;
display: flex;
width: 100%;
margin-bottom: 10px;
}
label {
width: 45%;
padding-right: 5px;
text-align: right;
}
input, textarea {
width: 150%;
}
/* Footer Styling Definitions */
footer {
display: flex;
flex-direction: row;
margin-top: 0px;
text-align: center;
background-color: black;
color: aliceblue;
}
#footer_left {
flex: 1;
padding-left: 5px;
}
#footer_centre {
flex: 1;
padding-left: 5px;
}
#footer_right {
flex: 1;
padding-left: 5px;
position: relative;
display: flex;
justify-content: center;
align-items: flex-end;
}
.logo_footer {
padding-top: 10px;
padding-bottom: 10px;
}
.legal {
margin: 0;
padding-top: 5px;
}
.legal_stuff {
text-decoration: none;
color: white;
}
.privacy_policy {
text-decoration: none;
color: white;
}
.privacy_policy:hover {
font-weight: bold;
}
.legal_stuff:hover {
font-weight: bold;
}
#media screen and (max-width: 1024px) {
section {
width: 100%;
}
}
#media screen and (max-width: 800px) {
nav {
width: 100%;
}
section {
flex-direction: column;
}
aside {
display: none;
}
nav ul {
flex-direction: column;
}
form {
margin: 0 auto;
flex-direction: column;
}
.label {
text-align: left;
}
footer {
flex-direction: column;
}
}
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css" text="text/css">
<title>Summer Escapes | Contact Us</title>
</head>
<body>
<!-- Main Navigation -->
<nav>
<ul>
<lI>Home</lI>
<lI>Reviews</lI>
<lI>Feedback</lI>
<lI>Contact Us</lI>
</ul>
</nav>
<!-- End Main Naigation -->
<!-- Page Header -->
<header>
<img class="logo_header" src="images/sunset_escapes_logo.png" alt="Summer Escapes Logo" height="auto">
</header>
<!-- End Page Header -->
<!-- Main Content -->
<section>
<article>
<div id="article_left">
<h2>Call Us!</h2>
<img class="call_img" src="images/phone-icon-925.png">
<h3>
<p>Want to speak to a human regarding our Summer Escapes reviews?</p>
<p>Maybe you have a review request?</p>
<p>Call us now!</p>
<p><a class="phone" href="tel:+61 412 345 678">+61 123 456 789</a></p>
</h3>
</div>
<div id="article_right">
<h2>Contact Us!</h2>
<form id="contact_form">
<div class="input-box">
<label for="contact_name">Full name:</label>
<input type="text" id="contact_name" name="contact_name" placeholder="Name">
</div>
<div class="input-box">
<label for="contact_phone">Mobile number:</label>
<input type="tel" id="contact_phone" name="contact_phone" placeholder="Mobile number">
</div>
<div class="input-box">
<label for="contact_email">Email address:</label>
<input type="email" id="contact_email" name="contact_email" placeholder="E-mail address">
</div>
<div class="input-box">
<label for="contact_message">Message:</label>
<textarea rows="4" cols="40" id="contact_message" name="contact+message" style="resize: none"></textarea>
</div>
<div class="button">
<button type="submit">Submit</button>
</div>
</form>
</div>
</article>
</section>
<!-- End Main Content -->
<!-- Footer -->
<footer>
<div id="footer_left">
<p>Socials</p>
</div>
<div id="footer_centre">
<img class="logo_footer" src="images/sunset_escapes_logo_inverted.png" alt="Summer Escapes Logo">
<p>Copyright © 2021 Summer Escapes</p>
</div>
<div id="footer_right">
<div class="legal">
<a class="legal_stuff" href="#" target="new">Legal Stuff</a> | <a class="privacy_policy" href="#" target="new">Privacy Policy</a>
</div>
</div>
</footer>
<!-- End Footer -->
</body>
</html>
#charset "UTF-8";
/* CSS Document */
#import url('https://fonts.googleapis.com/css2?family=Baloo+2&family=Comfortaa&family=Shadows+Into+Light&display=swap');
body {
font-size: 100%;
line-height: 1.5;
margin: 0;
padding: 0;
font-family: 'Baloo 2', cursive;
/*font-family: 'Comfortaa', cursive;*/
height: 100vh;
}
p {
margin: auto;
text-align: center;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
h1 {
}
h2 {
text-align: center;
font-size: 2em;
margin-bottom: auto;
margin-top: auto;
}
/* Navigation Styling Definitions */
nav {
width: 100%;
top: 0;
position: fixed;
background-color: rgba(255,255,255,0.70);
z-index: 101;
}
nav ul {
display: flex;
}
nav li {
flex: 1;
display: inline;
list-style-type: none;
text-align: center;
}
nav a {
text-decoration: none;
color: black;
}
nav a:hover {
text-decoration: overline underline;
color: darkslategray;
}
/* Header Styling Definitions */
header {
background-image: url("images/sunset-1645103.jpeg");
position: relative;
width: 100%;
height: 200px;
background-position: center;
margin-top: 55px;
}
.logo_header {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
/* Section Styling Definitions */
section {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
width: 100%;
margin: 0 auto;
}
.phone {
text-decoration: none;
color: black;
}
.phone:hover {
color: darkslategray;
}
.call_img {
width: 40px;
height: 40px;
padding-bottom: -10px;
}
/* Aside Styling Definitions */
aside {
flex: 1;
background-color: blue;
}
/* Article Styling Definitions */
article {
display: flex;
flex: 3;
background-color: transparent;
}
#article_left {
flex: 1;
align-content: center;
margin-right: auto;
background-color: aqua;
}
#article_right {
flex: 1;
align-content: center;
justify-content: center;
padding-bottom: 5px;
background-color: transparent;
margin-left: auto;
}
.cta {
flex: 30;
border: 1px solid black;
border-radius: 5px;
margin: 25px;
padding-left: 5px;
}
form {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
margin: 0 auto;
width: 80%;
}
.input-box {
padding-right: 5px;
display: flex;
width: 100%;
margin-bottom: 10px;
}
label {
width: 45%;
padding-right: 5px;
text-align: right;
}
input, textarea {
width: 150%;
}
/* Footer Styling Definitions */
footer {
display: flex;
flex-direction: row;
margin-top: 0px;
text-align: center;
background-color: black;
color: aliceblue;
}
#footer_left {
flex: 1;
padding-left: 5px;
}
#footer_centre {
flex: 1;
padding-left: 5px;
}
#footer_right {
flex: 1;
padding-left: 5px;
position: relative;
}
.logo_footer {
padding-top: 10px;
padding-bottom: 10px;
}
.legal {
margin: 0;
padding-top: 5px;
position: absolute;
top: 90%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.legal_stuff {
text-decoration: none;
color: white;
}
.privacy_policy {
text-decoration: none;
color: white;
}
.privacy_policy:hover {
font-weight: bold;
}
.legal_stuff:hover {
font-weight: bold;
}
#media screen and (max-width: 1024px) {
section {
width: 100%;
}
}
#media screen and (max-width: 800px) {
nav {
width: 100%;
}
section {
flex-direction: column;
}
aside {
display: none;
}
nav ul {
flex-direction: column;
}
form {
margin: 0 auto;
flex-direction: column;
}
.label {
text-align: left;
}
footer {
flex-direction: column;
}
}
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css" text="text/css">
<title>Summer Escapes | Contact Us</title>
</head>
<body>
<!-- Main Navigation -->
<nav>
<ul>
<lI>Home</lI>
<lI>Reviews</lI>
<lI>Feedback</lI>
<lI>Contact Us</lI>
</ul>
</nav>
<!-- End Main Naigation -->
<!-- Page Header -->
<header>
<img class="logo_header" src="images/sunset_escapes_logo.png" alt="Summer Escapes Logo" height="auto">
</header>
<!-- End Page Header -->
<!-- Main Content -->
<section>
<article>
<div id="article_left">
<h2>Call Us!</h2>
<img class="call_img" src="images/phone-icon-925.png">
<h3>
<p>Want to speak to a human regarding our Summer Escapes reviews?</p>
<p>Maybe you have a review request?</p>
<p>Call us now!</p>
<p><a class="phone" href="tel:+61 412 345 678">+61 123 456 789</a></p>
</h3>
</div>
<div id="article_right">
<h2>Contact Us!</h2>
<form id="contact_form">
<div class="input-box">
<label for="contact_name">Full name:</label>
<input type="text" id="contact_name" name="contact_name" placeholder="Name">
</div>
<div class="input-box">
<label for="contact_phone">Mobile number:</label>
<input type="tel" id="contact_phone" name="contact_phone" placeholder="Mobile number">
</div>
<div class="input-box">
<label for="contact_email">Email address:</label>
<input type="email" id="contact_email" name="contact_email" placeholder="E-mail address">
</div>
<div class="input-box">
<label for="contact_message">Message:</label>
<textarea rows="4" cols="40" id="contact_message" name="contact+message" style="resize: none"></textarea>
</div>
<div class="button">
<button type="submit">Submit</button>
</div>
</form>
</div>
</article>
</section>
<!-- End Main Content -->
<!-- Footer -->
<footer>
<div id="footer_left">
<p>Socials</p>
</div>
<div id="footer_centre">
<img class="logo_footer" src="images/sunset_escapes_logo_inverted.png" alt="Summer Escapes Logo">
<p>Copyright © 2021 Summer Escapes</p>
</div>
<div id="footer_right">
<div class="legal">
<a class="legal_stuff" href="#" target="new">Legal Stuff</a> | <a class="privacy_policy" href="#" target="new">Privacy Policy</a>
</div>
</div>
</footer>
<!-- End Footer -->
</body>
</html>

large grid css no picture displaying

I have a webpage where the css for the small and medium size work and display fine. my problem is with the large, everything is formatted correctly except that the page picture won't display. How do I fix this? Attached is the page layout and the full css. The error should be under the #media(min-width: 1024px)
header {
background-color: #002171;
color: #FFFFFF;
background-position: right;
background-repeat: no-repeat;
}
header a:link {
color: #FFFFFF;
text-decoration-line: none;
}
header a:visited {
color: #FFFFFF;
text-decoration-line: none;
}
header a:hover {
color: #90C7E3;
}
h1 {
margin-top: 0;
margin-bottom: 0;
text-align: center;
font-family: Georgia, serif;
letter-spacing: 0.25em;
padding-top: 0.5em;
padding-bottom: 0.5em;
}
* {
box-sizing: border-box;
}
nav {
font-weight: bold;
font-size: 120%;
padding: 0;
text-align: center;
}
nav li {
border-bottom: none;
}
nav a {
text-decoration: none;
}
section {
padding-left: 2em;
padding-right: 2em;
}
h2 {
color: #1976D2;
font-family: Georgia, serif;
text-shadow: 1px 1px 1px #CCCCCC;
}
h3 {
color: #000033;
font-family: Georgia, serif;
}
#media(min-width: 600px) {
nav ul {
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
justify-content: space-around;
}
.content main {
display: grid;
grid-template-rows: auto;
grid-template-columns: 1fr 1fr 1fr;
}
h2 {
grid-row: 1 / 2;
grid-column: 1 / 5;
}
section {
grid-row: 2 / 3;
grid-column: auto;
}
#special {
grid-row: auto;
grid-column: 1 / 5;
}
footer {
grid-row: auto;
grid-column: 1 / 5;
}
}
#media(min-width: 1024px) {
nav ul {
flex-direction: column;
padding-top: 1em;
}
nav {
text-align: left;
padding-left: 1em;
padding-right: 1em;
grid-row: 2/3;
grid-column: 1/2;
}
main {
grid-row: 2/3;
grid-column: 2/3;
}
footer {
grid-row: 3/4;
grid-column: 2/4;
}
header {
grid-row: 1/2;
grid-column: 1/4;
}
#wrapper {
margin: auto;
width: 80%;
border: #00008B;
box-shadow: 1px 1px 1px;
display: grid;
grid-row: 3/3;
grid-column: 2/2;
}
}
}
main ul {
list-style-image: url('marker.gif');
font-family: Georgia, serif;
}
nav ul {
list-style: none;
margin: 0;
padding-left: 0;
font-size: 1.2em;
}
nav a:link {
color: #5C7FA3;
}
nav a:visited {
color: #344873;
}
nav a:hover {
color: #A52A2A;
}
body {
font-family: Helvetica;
background-color: #EAEAEA;
color: #666666;
}
main {
background-color: #FFFFFF;
padding-top: 1px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 30px;
overflow: auto;
display: block;
}
dt {
color: #002171;
}
#wrapper {
background-color: #90C7E3;
background-image: linear-gradient(#FFFFFF, #90C7E3);
}
#homehero {
background-image: url('coast2.jpg');
height: 300px;
background-size: 100% 100%;
background-repeat: no-repeat;
}
#yurthero {
background-image: url('yurt.jpg');
height: 300px;
background-size: 100% 100%;
background-repeat: no-repeat;
}
#trailhero {
background-image: url('trail.jpg');
height: 300px;
background-size: 100% 100%;
background-repeat: no-repeat;
}
.resort {
font-weight: bold;
color: #1976D2;
}
footer {
background-color: #FFFFFF;
font-family: Georgia, serif;
font-size: 75%;
font-style: italic;
text-align: center;
padding: 2em;
}
#contact {
font-size: 90%;
}
<div id="wrapper">
<header>
<h1>Pacific Trails Resort</h1>
</header>
<nav>
<ul>
<li>Home</li>
<li>Yurts</li>
<li>Activities</li>
<li>Reservations</li>
</ul>
</nav>
<div id="homehero">
</div>
<main>
<h2>Enjoy Nature in Luxury</h2>
<p><span class="resort">Pacific Trails Resort</span> offers a special lodging experience on the California North Coast with panoramic views of the Pacific Ocean. Your stay at Pacific Trails Resort includes a sumptuously appointed private yurt and a cooked-to-order
breakfast each morning.</p>
<ul>
<li>Unwind in the heated outdoor pool and whirlpool</li>
<li>Explore the coast on your own or join our guided tours</li>
<li>Relax in our lodge while enjoying complimentary appetizers and beverages</li>
<li>Savor nightly fine dining with an ocean view</li>
</ul>
<div id="contact">
<span class="resort">Pacific Trails Resort</span><br> 12010 Pacific Trails Road <br> Zephyr, CA 95555<br>
<br> 888-555-5555
<br>
</div>
</main>
<footer>
Copyright © 2020 Pacific Trails Resort<br>
freed.nm#rhodesstate.edu
</footer>
</div>
From what I understand your image does not appear when the screen size is greater than 1024px. I made some changes to the code and got it to work as you wish, I think ...
I hope that's what you want
<!DOCTYPE html>
<html lang="en">
<head>
<title>Pacific Trails Resort</title>
<!-- <link rel="stylesheet" href="pacific.css"> -->
<meta charset="utf-8">
<style>
header {
background-color: #002171;
color: #FFFFFF;
background-position: right;
background-repeat: no-repeat;
}
header a:link {
color: #FFFFFF;
text-decoration-line: none;
}
header a:visited {
color: #FFFFFF;
text-decoration-line: none;
}
header a:hover {
color: #90C7E3;
}
h1 {
margin-top: 0;
margin-bottom: 0;
text-align: center;
font-family: Georgia, serif;
letter-spacing: 0.25em;
padding-top: 0.5em;
padding-bottom: 0.5em;
}
* {
box-sizing: border-box;
}
nav {
font-weight: bold;
font-size: 120%;
padding: 0;
text-align: center;
}
nav li {
border-bottom: none;
}
nav a {
text-decoration: none;
}
section {
padding-left: 2em;
padding-right: 2em;
}
h2 {
color: #1976D2;
font-family: Georgia, serif;
text-shadow: 1px 1px 1px #CCCCCC;
}
h3 {
color: #000033;
font-family: Georgia, serif;
}
#media(min-width: 600px) {
nav ul {
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
justify-content: space-around;
}
.content main {
display: grid;
grid-template-rows: auto;
grid-template-columns: 1fr 1fr 1fr;
}
h2 {
grid-row: 1 / 2;
grid-column: 1 / 5;
}
section {
grid-row: 2 / 3;
grid-column: auto;
}
#special {
grid-row: auto;
grid-column: 1 / 5;
}
footer {
grid-row: auto;
grid-column: 1 / 5;
}
}
#media(min-width: 1024px) {
nav ul {
flex-direction: column;
padding-top: 1em;
}
nav {
text-align: left;
padding-left: 1em;
padding-right: 1em;
grid-row: 2/3;
grid-column: 1/2;
}
main {
grid-row: 2/3;
grid-column: 2/3;
}
footer {
grid-row: 3/4;
grid-column: 2/4;
}
header {
grid-row: 1/2;
grid-column: 1/4;
}
#wrapper {
margin: auto;
width: 80%;
border: #00008B;
box-shadow: 1px 1px 1px;
display: grid;
grid-row: 3/3;
grid-column: 2/2;
}
}
}
main ul {
list-style-image: url('marker.gif');
font-family: Georgia, serif;
}
nav ul {
list-style: none;
margin: 0;
padding-left: 0;
font-size: 1.2em;
}
nav a:link {
color: #5C7FA3;
}
nav a:visited {
color: #344873;
}
nav a:hover {
color: #A52A2A;
}
body {
font-family: Helvetica;
background-color: #EAEAEA;
color: #666666;
}
main {
background-color: #90C7E3;
padding-top: 1px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 30px;
overflow: auto;
display: block;
}
dt {
color: #002171;
}
#wrapper {
background-color: #90C7E3;
background-image: linear-gradient(#FFFFFF, #90C7E3);
}
#homehero {
height: 300px;
background-size: 100% 100%;
background-repeat: no-repeat;
}
#yurthero {
background-image: url('yurt.jpg');
height: 300px;
background-size: 100% 100%;
background-repeat: no-repeat;
}
#trailhero {
background-image: url('trail.jpg');
height: 300px;
background-size: 100% 100%;
background-repeat: no-repeat;
}
.resort {
font-weight: bold;
color: #1976D2;
}
footer {
background-color: #EAEAEA;
font-family: Georgia, serif;
width: 100%;
font-size: 75%;
font-style: italic;
text-align: center;
padding: 22px;
}
#contact {
font-size: 90%;
}
.details {
padding: 20px;
}
</style>
</head>
<body>
<div id="wrapper">
<header>
<h1>Pacific Trails Resort</h1>
</header>
<nav>
<ul>
<li>Home</li>
<li>Yurts</li>
<li>Activities</li>
<li>Reservations</li>
</ul>
</nav>
<div id="homehero">
<img src="coast2.jpg" alt="Coast2 Image">
</div>
<hr>
<div class="wrap">
<main>
<h2>Enjoy Nature in Luxury</h2>
<p><span class="resort">Pacific Trails Resort</span> offers a special lodging experience on the
California
North Coast with panoramic views of the Pacific Ocean. Your stay at Pacific Trails Resort includes a
sumptuously appointed private yurt and a cooked-to-order breakfast each morning.</p>
<ul>
<li>Unwind in the heated outdoor pool and whirlpool</li>
<li>Explore the coast on your own or join our guided tours</li>
<li>Relax in our lodge while enjoying complimentary appetizers and beverages</li>
<li>Savor nightly fine dining with an ocean view</li>
</ul>
<div id="contact">
<span class="resort">Pacific Trails Resort</span><br>
12010 Pacific Trails Road <br>
Zephyr, CA 95555<br>
<br>
888-555-5555<br>
</div>
</main>
</div>
<!-- <footer>
Copyright © 2020 Pacific Trails Resort<br>
freed.nm#rhodesstate.edu
</footer> -->
<div class="details">
<h2>Details</h2>
<ul>
<li>Dedicated</li>
<li>Fast</li>
<li>Secure</li>
</ul>
<br><br>
<h2>Social Networks</h2>
<ul>
<li>Facebook</li>
<li>Instagram</li>
<li>Twitter</li>
</ul>
<br><br>
<h2>Details</h2>
<ul>
<li>Dedicated</li>
<li>Fast</li>
<li>Secure</li>
</ul>
<br><br>
<h2>Social Networks</h2>
<ul>
<li>Facebook</li>
<li>Instagram</li>
<li>Twitter</li>
</ul>
<br><br>
</div>
</div>
<br><br>
<footer>
Copyright © 2020 Pacific Trails Resort<br>
freed.nm#rhodesstate.edu
</footer>
</body>
</html>
Please leave any comments if any problems arise, I would like to help

A flexbox property ignored on media query

I followed a YouTube video called "The 2020 HTML & CSS Crash Course - From Mockup to Product", everything is fine and works as it should, except in one thing (which I will explain), however the problem doesn't seem to happen on the teachers website, even though the code is exactly the same.
So, the problem is that in one of the media queries (650px), the .companies selector takes on display: flex, but it completely ignores the justify-content property and it breaks out of the container and off the screen, and this happens on my laptop, desktop, and I tried on my girlfriends macbook: same thing in all. It doesn't seem to happen in his, it works as it should as far as I can see. Anyway, I'll put the code below and also here's the link to the teachers codepen: https://codepen.io/designcourse/pen/bGdQGgQ
Which I should mention, still has the problem on my computers, it's only on his videos where it doesn't happen (that I can see).
Thanks in advance, this is driving me mad.
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/main.css">
<title>Document</title>
</head>
<body>
<div class="hero-wrapper">
<div class="wrapper">
<header>
WebDeveloper
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
</header>
<div class="hero-content">
<h1>I help millions of people learn stuff</h1>
<p class="subtitle">Teaching UI / UX & Frontend Development</p>
</div>
</div>
</div>
<div class="light-purple-wrapper">
<div class="wrapper">
<ul class="stats">
<li>
<strong>26.5M</strong>
<span>Youtube Views</span>
</li>
<li>
<strong>535K</strong>
<span>YouTube Subs</span>
</li>
<li>
<strong>86</strong>
<span>Courses</span>
</li>
<li>
<strong>750</strong>
<span>Video Tutorials</span>
</li>
<li>
<strong>58</strong>
<span>Countries</span>
</li>
</ul>
</div>
<div class="extended-wrapper carousel-container">
<img src="images/arrow_copy_copy.svg" id="left-arrow" class="arrows" alt="">
<ul class="carousel">
<li>
<blockquote>"Gary is a life saver. I don't have the time or money for a college education. My goal is to
become a freelance web developer, and thanks to Gary, I'm really close."</blockquote>
<cite>John Doe</cite>
</li>
<li>
<blockquote>"Gary is a life saver. I don't have the time or money for a college education. My goal is to
become a freelance web developer, and thanks to Gary, I'm really close."</blockquote>
<cite>John Doe</cite>
</li>
</ul>
<img src="images/arrow_copy_copy.svg" id="right-arrow" class="arrows right" alt="">
</div>
</div>
<div class="wrapper move-up v-padding">
<h2>Companies I've worked with.</h2>
<ul class="companies">
<li><img src="images/skillshare.svg" alt="skillshare" class="skillshare"></li>
<li><img src="images/ps.svg" alt="plural sight" class="ps"></li>
<li><img src="images/skillshare.svg" alt="skillshare" class="skillshare"></li>
<li><img src="images/ps.svg" alt="plural sight" class="ps"></li>
</ul>
</div>
</body>
</html>
////// SCSS ///////
#import url('https://fonts.googleapis.com/css?family=Montserrat:300,800&display=swap');
* {
box-sizing: border-box;
}
body {
margin: 0;
background: #2B192F;
color: #fff;
font-family: 'Montserrat';
}
a {
color: #fff;
text-decoration: none;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.hero-wrapper {
background: url('../images/bg_copy.jpg');
background-size: cover;
}
.wrapper {
padding: 1.5em;
max-width: 1200px;
margin: 0 auto;
}
header {
display: flex;
justify-content: space-between;
.logo {
font-weight: bold;
}
ul {
display: flex;
li a {
padding: 0 .6em;
}
}
}
.hero-content {
margin: 4em 0 2em;
.subtitle {
margin-bottom: 0;
}
}
.light-purple-wrapper {
background: #351F3A;
}
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
justify-content: space-around;
margin-top: 2em;
li {
margin-bottom: 1.5em;
}
strong {
font-size: 1.4em;
}
span {
display: block;
text-transform: uppercase;
font-size: .7em;
}
}
.arrows {
display: none;;
}
.extended-wrapper {
padding: 0 1.5em 2em;
max-width: 1230px;
margin: 0 auto;
}
ul.carousel {
margin-bottom: 1em;
li {
background: #422847;
padding: 1em;
margin-bottom: 1em;
}
}
blockquote {
margin: 0;
font-size: .8em;
line-height: 1.8em;
margin-bottom: 1em;
}
cite {
color:#E379FF;
font-weight: bold;
font-size: .8em;
font-style: normal;
position: relative;
padding-left: 25px;
}
cite::before {
content: " ";
position: absolute;
left: 0;
top: 6px;
height: 1px;
width: 20px;
border-bottom: 1px solid #fff;
}
h2 {
text-align: center;
position: relative;
}
h2::before {
content: "";
position: absolute;
height: 5px;
width: 30px;
background: #B728DC;
top: -.3em;
}
.companies {
text-align: center;
opacity: .4;
li {
margin: 2em 0;
}
.skillshare {
width: 100px;
}
.ps {
width: 200px;
}
}
#media (min-width: 500px) {
.companies {
display: grid;
grid-template-columns: repeat(2, auto);
}
}
#media (min-width: 650px) {
body {
font-size: 18px;
}
.wrapper {
padding: 1.5em 4em;
}
.carousel-container {
display: flex;
}
.arrows {
display: block;
width: 40px;
cursor: pointer;
margin: .5em;
}
.right {
transform: rotateZ(180deg);
}
ul.carousel {
display: flex;
margin-bottom: 0;
li {
margin-right: 1em;
margin-bottom: 0;
padding: 2em;
&:last-child {
margin-right: 0;
}
}
}
.companies {
display: flex;
justify-content: space-between;
}
}
#media (min-width: 853px) {
body {
font-size: 20px;
}
.stats {
display: flex;
justify-content: space-between;
margin: 0;
}
.companies {
grid-template-columns: repeat(4, auto);
}
h1 {
font-size: 2.5em;
}
.subtitle {
font-size: 1.2em;
}
h2 {
text-align: left;
font-size: 2em;
}
.v-padding {
padding: 4em;
}
.light-purple-wrapper {
padding-bottom: 4em;
}
.move-up {
margin-top: -7em;
}
}
#media (min-width: 1200px) {
.stats li {
border-right: 1px solid rgb(124, 89, 148);
padding-right: 5%;
&:last-child {
border: none;
}
}
}

Resources