CSS: help with overflow (horizontally) in responsive view

Hello, everybody! I’m still working on my first project. I’m working to make it responsive, but I’m having some issues.

I have a row of images that I want do display:

And on small screens I would like to display it with horizontal overflow, but the first picture is not showing and the second is cut in half:

I tried to use padding, but I would have to set it to every size of screen possible, or it looks like this:

I would like to get some idea from you! Thank you all!

Repl link:

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;1,200;1,300;1,400&display=swap');

* {
    background-color: #F2F1DD;
    margin: 0;
    padding: 0;
    box-sizing:border-box;
}

::selection {
    background-color: #009576;
    color: white;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
}

a {
    text-decoration: none;
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 6vh;
    padding: 10px;
    width: 100%;
}

nav .responsivenav i {
    color: #FF79CD;
    cursor: pointer;
    display: none;
}

.logo {
    color: #009576;
    font-size: 40px;        
    line-height: normal;
    text-transform: uppercase;
    width: 100%;
    font-family: "Oswald", sans-serif;;
    font-style: normal;
    font-weight: 600; 
}

.navlist {
    list-style: none;
    display: flex;
}

.navlist li {
    color: #FF79CD;
    font-size: 27px;
    font-family: Lora;
    font-weight: 700;
    display: inline-block;
    margin-left:20px;
}

li a {
    color: #FF79CD;
}

a:visited, a:active {
    text-decoration: none;
    color: none;
}

#header {
    width: 100%;
    position: relative;
    margin-bottom: 0;
}

#header img {
    background-image: url(fotoheader.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    height: auto;
    width: 100%;
    background-position: center;
}

.ribbon {
    display: flex;
    width: 100%;
    height: 30px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #FF79CD;
    position: relative;
    margin-top: -5px;
    margin-bottom: 70px;
}

.ribbon span {
    color: #FFF;
    text-align: center;
    font-family: Outfit;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-transform: lowercase;
    background-color: #FF79CD;
}

.collection_container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    height: auto;
    position: relative;
    align-content: center;
    height: auto;
    align-items: center;
    margin-bottom: 70px;
}

.collection_container img {
    background-repeat: no-repeat;
    background-size: cover;
    max-width:170px;
    max-height:230px;
    width: auto;
    height: auto;
    margin-right: 5px;
    transition-duration: 0.7s;
    border: 3px solid #83B6B2;
}

.collection_container:hover img {
    filter: grayscale(100%);
}

.collection_container img:not(:hover) {
    filter: grayscale(0%);
}

.main_container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    height: auto;
    position: relative;
    align-content: center;
    height: auto;
    align-items: center;
    margin-bottom: 70px;
}


.container {
    display: flex;
    width: 100%;
    height: auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 70px;
}

.container2 {
    display: flex;
    width: 100%;
    height: 80px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10px;
    margin-bottom: 70px;
}

h1 {
    color: #009576;
    text-align: center;
    font-family: "Oswald", sans-serif;
    font-style: normal;
    font-weight: 600; 
    font-size: 65px;
    line-height: normal;
}

.title {
    color: #FF79CD;
    text-align: center;
    font-family: "Oswald", sans-serif;
    font-style: normal;
    font-weight: 600; 
    font-size: 50px;
    line-height: normal;
}

.title2 {
    color: #009576;
    text-align: center;
    font-size: 50px;
    font-family: "Oswald", sans-serif;
    font-style: normal;
    font-weight: 600; 
    line-height: normal;
}

.about {
    display: flex;
    flex-direction: column;
    width: 65%;
    height: auto;
}

.about p {
    color: #6A6A6A;
    font-family: Outfit;
    font-size: 19px;
    font-style: normal;
    font-weight: 400;
    text-align: center;
    line-height: 2;
}

.about2 {
    display: flex;
    flex-direction: column;
    width: 65%;
}

.about2 p {
    color: #6A6A6A;
    font-family: Outfit;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    text-align: right;
    line-height: 2;
}

.stores {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    margin-bottom: 70px;
    padding-top: 70px;
}

.stores p {
    color: #6A6A6A;
    font-family: Outfit;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: left;
    line-height: 1.5;
}

.stores_title {
    color: #FF79CD;
    font-family: Outfit;
    font-size: 30px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

input {
    padding: 5px;
    margin: 10px 0;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.06);
    font-family: Outfit, sans-serif;
    font-size: 15px;
    border: 2px solid #009576;
    transition: .3s border-color;
    display: block;
    color: #6A6A6A;
    border-radius: 5px;
}

input:hover, textarea:hover {
    border: 2px solid #006d57;
}

input:focus, textarea:focus {
    outline: none;
}

textarea {
    width:100%;
    resize: vertical;
    padding: 5px;
    margin: 10px 0;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.06);
    max-height: 80px;
    font-family: Outfit, sans-serif;
    font-size: 15px;
    border: 2px solid #009576;
    transition: .3s border-color;
    color: #6A6A6A;
    border-radius: 5px;
    max-width: 400px;
    display: block;
  }

.form_label {
    color: #fff;
    font-family: Outfit;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    text-align: right;
    line-height: 1.7;
    letter-spacing: 1.2;
}

button {
    min-width: 70px;
    height: 30px;
    color: #fff;
    font-family: Outfit;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    outline: none;
    border-radius: 5px;
    border: none;
    background-color: #009576 !important;
    margin-top: 10px;
    float: right;
}

button:hover {
    background-color: #006d57 !important;
}

button:active {
    top: 2px;
}

.form_title {
    color: #fff;
    text-align: center;
    font-size: 40px;
    font-family: "Oswald", sans-serif;
    font-style: normal;
    font-weight: 600; 
    line-height: normal;
    margin-bottom: 10px;
}

.copyright_container {
    max-width: 50%;
}

.footer_container * {
    background-color: #83B6B2;
}

.footer_container {
    background-color: #83B6B2;
    padding: 70px 0 100px 0;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-evenly;
    width: 100%;
    height: auto;
    position: relative;
    align-content: center;
    height: auto;
    align-items: center;
}

.footer_container p {
    color: #fff;
    font-family: Outfit;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    text-align: center;
    line-height: 2;
}

.show_responsive {
    display: none;
}

@media (max-width: 767px) {
    
    nav .responsivenav i{
        display: block;
    }
    nav ul {
        position: fixed;
        top: 555px;
        right: -100%;
        background-color: #009576;
        height: 100vh;
        width: 100%;
        text-align: center;
        display: block;
        transition: all 0.3s ease;
        z-index: 1;
        opacity: 0.9;
    }

    nav ul * {
        background-color: #009576;
    }

    nav ul.open {
        right: 0;
    }

    nav ul li{
        width: 100%;
        margin: 20px 0;
        background-color: transparent;
    }
    nav ul li a {
        font-size: 23px;
        color: #fff;
        transition: all 0.3s ease;
    }
    nav ul li a.active,
    nav ul li a:hover{
        background: none;
        color: #E50592;
    }   

    .navlist {
        flex-direction: column;
    }

    h1 {
        font-size: 45px;
    }

    .container, .container2, .main_container, .collection_container, .ribbon {
        margin-bottom: 40px;
    }

    .ribbon span {
        font-size: 13px;
        font-weight: normal;
        padding: 5px 10px;
    }

    .about {
        margin-bottom: 30px;
    }

    .about p, .about2 p {
        font-size: 15px;
        line-height: 1.5;
        text-align: center;
    }

    .title, .title2 {
        font-size: 40px;
        margin-bottom: 40px;
    }

    .collection_container {
        max-width: 100%;
        overflow-x: auto;
        margin-right: 0px;
    }

    .collection_container img {
        max-width: 120px;
        max-height: 180px;
    }

    .main_container {
        flex-direction: column;
    }

    .show_responsive {
        display: block;
    }

    .hide_responsive {
        display: none;
    }

    .stores {
        margin-bottom: 30px;
        padding-top: 0;
    }

    .footer_container {
        flex-direction: column;
        padding: 60px 0;
    }

    .footer_container p {
        font-size: 13px;
        font-weight: normal;
    }

    button {
        margin-bottom: 20px;
    }

    .logo {
        font-size: 16px;
    }

    .copyright_container {
        margin: 30px 0;
        padding: 10px 0;
    }

}

@media (min-width: 768px) and (max-width: 1023px) {

    h1 {
        font-size: 55px;
    }

    .container, .container2, .main_container, .collection_container, .ribbon {
        margin-bottom: 40px;
    }

    .ribbon span {
        font-size: 16px;
        font-weight: normal;
        padding: 5px 10px;
    }

    .about {
        margin-bottom: 30px;
    }

    .about p, .about2 p {
        font-size: 16px;
        line-height: 1.5;
        text-align: center;
    }

    .title, .title2 {
        font-size: 40px;
        margin-bottom: 40px;
    }

    .collection_container {
        max-width: 100%;
        width: 100%;
        overflow-x: auto;
        margin-right: 0;
        padding-left: 110px;
    }

    .collection_container img {
        max-width: 120px;
        max-height: 180px;
    }

    .main_container {
        flex-direction: column;
    }

    .show_responsive {
        display: flex;
    }

    .hide_responsive {
        display: none;
    }

    .stores {
        margin-bottom: 30px;
        max-width: 150px;
    }

    .store_responsive {
        flex-direction: row;
    }

    .footer_container {
        flex-direction: column;
        padding: 60px 0;
    }

    .footer_container p {
        font-size: 13px;
        font-weight: normal;
    }

    .logo {
        font-size: 16px;
    }

    .copyright_container {
        margin: 40px 0;
        padding: 20px 0;
    }
}

@media (min-width: 1024px) {

}
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;1,200;1,300;1,400&display=swap');

* {
    background-color: #F2F1DD;
    margin: 0;
    padding: 0;
    box-sizing:border-box;
}

::selection {
    background-color: #009576;
    color: white;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
}

a {
    text-decoration: none;
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 6vh;
    padding: 10px;
    width: 100%;
}

nav .responsivenav i {
    color: #FF79CD;
    cursor: pointer;
    display: none;
}

.logo {
    color: #009576;
    font-size: 40px;        
    line-height: normal;
    text-transform: uppercase;
    width: 100%;
    font-family: "Oswald", sans-serif;;
    font-style: normal;
    font-weight: 600; 
}

.navlist {
    list-style: none;
    display: flex;
}

.navlist li {
    color: #FF79CD;
    font-size: 27px;
    font-family: Lora;
    font-weight: 700;
    display: inline-block;
    margin-left:20px;
}

li a {
    color: #FF79CD;
}

a:visited, a:active {
    text-decoration: none;
    color: none;
}

#header {
    width: 100%;
    position: relative;
    margin-bottom: 0;
}

#header img {
    background-image: url(fotoheader.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    height: auto;
    width: 100%;
    background-position: center;
}

.ribbon {
    display: flex;
    width: 100%;
    height: 30px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #FF79CD;
    position: relative;
    margin-top: -5px;
    margin-bottom: 70px;
}

.ribbon span {
    color: #FFF;
    text-align: center;
    font-family: Outfit;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-transform: lowercase;
    background-color: #FF79CD;
}

.collection_container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    height: auto;
    position: relative;
    align-content: center;
    height: auto;
    align-items: center;
    margin-bottom: 70px;
}

.collection_container img {
    background-repeat: no-repeat;
    background-size: cover;
    max-width:170px;
    max-height:230px;
    width: auto;
    height: auto;
    margin-right: 5px;
    transition-duration: 0.7s;
    border: 3px solid #83B6B2;
}

.collection_container:hover img {
    filter: grayscale(100%);
}

.collection_container img:not(:hover) {
    filter: grayscale(0%);
}

.main_container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    height: auto;
    position: relative;
    align-content: center;
    height: auto;
    align-items: center;
    margin-bottom: 70px;
}


.container {
    display: flex;
    width: 100%;
    height: auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 70px;
}

.container2 {
    display: flex;
    width: 100%;
    height: 80px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10px;
    margin-bottom: 70px;
}

h1 {
    color: #009576;
    text-align: center;
    font-family: "Oswald", sans-serif;
    font-style: normal;
    font-weight: 600; 
    font-size: 65px;
    line-height: normal;
}

.title {
    color: #FF79CD;
    text-align: center;
    font-family: "Oswald", sans-serif;
    font-style: normal;
    font-weight: 600; 
    font-size: 50px;
    line-height: normal;
}

.title2 {
    color: #009576;
    text-align: center;
    font-size: 50px;
    font-family: "Oswald", sans-serif;
    font-style: normal;
    font-weight: 600; 
    line-height: normal;
}

.about {
    display: flex;
    flex-direction: column;
    width: 65%;
    height: auto;
}

.about p {
    color: #6A6A6A;
    font-family: Outfit;
    font-size: 19px;
    font-style: normal;
    font-weight: 400;
    text-align: center;
    line-height: 2;
}

.about2 {
    display: flex;
    flex-direction: column;
    width: 65%;
}

.about2 p {
    color: #6A6A6A;
    font-family: Outfit;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    text-align: right;
    line-height: 2;
}

.stores {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    margin-bottom: 70px;
    padding-top: 70px;
}

.stores p {
    color: #6A6A6A;
    font-family: Outfit;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: left;
    line-height: 1.5;
}

.stores_title {
    color: #FF79CD;
    font-family: Outfit;
    font-size: 30px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

input {
    padding: 5px;
    margin: 10px 0;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.06);
    font-family: Outfit, sans-serif;
    font-size: 15px;
    border: 2px solid #009576;
    transition: .3s border-color;
    display: block;
    color: #6A6A6A;
    border-radius: 5px;
}

input:hover, textarea:hover {
    border: 2px solid #006d57;
}

input:focus, textarea:focus {
    outline: none;
}

textarea {
    width:100%;
    resize: vertical;
    padding: 5px;
    margin: 10px 0;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.06);
    max-height: 80px;
    font-family: Outfit, sans-serif;
    font-size: 15px;
    border: 2px solid #009576;
    transition: .3s border-color;
    color: #6A6A6A;
    border-radius: 5px;
    max-width: 400px;
    display: block;
  }

.form_label {
    color: #fff;
    font-family: Outfit;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    text-align: right;
    line-height: 1.7;
    letter-spacing: 1.2;
}

button {
    min-width: 70px;
    height: 30px;
    color: #fff;
    font-family: Outfit;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    outline: none;
    border-radius: 5px;
    border: none;
    background-color: #009576 !important;
    margin-top: 10px;
    float: right;
}

button:hover {
    background-color: #006d57 !important;
}

button:active {
    top: 2px;
}

.form_title {
    color: #fff;
    text-align: center;
    font-size: 40px;
    font-family: "Oswald", sans-serif;
    font-style: normal;
    font-weight: 600; 
    line-height: normal;
    margin-bottom: 10px;
}

.copyright_container {
    max-width: 50%;
}

.footer_container * {
    background-color: #83B6B2;
}

.footer_container {
    background-color: #83B6B2;
    padding: 70px 0 100px 0;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-evenly;
    width: 100%;
    height: auto;
    position: relative;
    align-content: center;
    height: auto;
    align-items: center;
}

.footer_container p {
    color: #fff;
    font-family: Outfit;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    text-align: center;
    line-height: 2;
}

.show_responsive {
    display: none;
}

@media (max-width: 767px) {
    
    nav .responsivenav i{
        display: block;
    }
    nav ul {
        position: fixed;
        top: 555px;
        right: -100%;
        background-color: #009576;
        height: 100vh;
        width: 100%;
        text-align: center;
        display: block;
        transition: all 0.3s ease;
        z-index: 1;
        opacity: 0.9;
    }

    nav ul * {
        background-color: #009576;
    }

    nav ul.open {
        right: 0;
    }

    nav ul li{
        width: 100%;
        margin: 20px 0;
        background-color: transparent;
    }
    nav ul li a {
        font-size: 23px;
        color: #fff;
        transition: all 0.3s ease;
    }
    nav ul li a.active,
    nav ul li a:hover{
        background: none;
        color: #E50592;
    }   

    .navlist {
        flex-direction: column;
    }

    h1 {
        font-size: 45px;
    }

    .container, .container2, .main_container, .collection_container, .ribbon {
        margin-bottom: 40px;
    }

    .ribbon span {
        font-size: 13px;
        font-weight: normal;
        padding: 5px 10px;
    }

    .about {
        margin-bottom: 30px;
    }

    .about p, .about2 p {
        font-size: 15px;
        line-height: 1.5;
        text-align: center;
    }

    .title, .title2 {
        font-size: 40px;
        margin-bottom: 40px;
    }

    .collection_container {
        max-width: 100%;
        overflow-x: auto;
        margin-right: 0px;
    }

    .collection_container img {
        max-width: 120px;
        max-height: 180px;
    }

    .main_container {
        flex-direction: column;
    }

    .show_responsive {
        display: block;
    }

    .hide_responsive {
        display: none;
    }

    .stores {
        margin-bottom: 30px;
        padding-top: 0;
    }

    .footer_container {
        flex-direction: column;
        padding: 60px 0;
    }

    .footer_container p {
        font-size: 13px;
        font-weight: normal;
    }

    button {
        margin-bottom: 20px;
    }

    .logo {
        font-size: 16px;
    }

    .copyright_container {
        margin: 30px 0;
        padding: 10px 0;
    }

}

@media (min-width: 768px) and (max-width: 1023px) {

    h1 {
        font-size: 55px;
    }

    .container, .container2, .main_container, .collection_container, .ribbon {
        margin-bottom: 40px;
    }

    .ribbon span {
        font-size: 16px;
        font-weight: normal;
        padding: 5px 10px;
    }

    .about {
        margin-bottom: 30px;
    }

    .about p, .about2 p {
        font-size: 16px;
        line-height: 1.5;
        text-align: center;
    }

    .title, .title2 {
        font-size: 40px;
        margin-bottom: 40px;
    }

    .collection_container {
        max-width: 100%;
        width: 100%;
        overflow-x: auto;
        margin-right: 0;
        padding-left: 110px;
    }

    .collection_container img {
        max-width: 120px;
        max-height: 180px;
    }

    .main_container {
        flex-direction: column;
    }

    .show_responsive {
        display: flex;
    }

    .hide_responsive {
        display: none;
    }

    .stores {
        margin-bottom: 30px;
        max-width: 150px;
    }

    .store_responsive {
        flex-direction: row;
    }

    .footer_container {
        flex-direction: column;
        padding: 60px 0;
    }

    .footer_container p {
        font-size: 13px;
        font-weight: normal;
    }

    .logo {
        font-size: 16px;
    }

    .copyright_container {
        margin: 40px 0;
        padding: 20px 0;
    }
}

@media (min-width: 1024px) {

}

You can add this to your style.css:

.elmnt {
  overflow-x:scroll;
}
2 Likes

I did, and it works, but the problem is that the first pictures are not showing entirely :frowning: