screens
class should be width: auto
and overflow-x:hidden
should be on button-section
See output in full screen
div {
width: auto;
}
@media (min-width: 768px) {
width:35%;
margin:auto;
}
.screens {
background: green;
height:"auto";
display: flex;
}
.screen {
background: red;
}
.header {
border: solid 1px black;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-evenly;
padding: 12px;
background: white;
}
.sit-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 1rem;
overflow: auto;
}
.strip {
width: 100vw;
@media (min-width: 768px) {
width: 35vw;
}
}
.view {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
min-height: 300px;
min-width: 300px;
animation-delay: 0.2s;
overflow-y: scroll;
flex-direction: column;
}
.view-1{
height: 300px;
width: 300px;
flex: 0 0 auto;
margin: 0 auto;
margin-top: 1rem;
border: solid 1px black;
}
.button-section{
display: flex;
flex-direction: column;
text-align: center;
margin-top: 1rem;
width: 100%;
overflow-x:hidden;
}
.play-button {
height: 1.25rem;
display: flex;
justify-content: center;
align-items: center;
color: black;
border: 1px solid black;
text-decoration: none;
padding: 1rem 1.25rem;
line-height: 1rem;
border-radius: 0.375rem;
font-size: 1rem;
font-style: normal;
font-weight: normal;
text-align: center;
text-transform: uppercase;
margin: 1rem;
}
.quit-button {
color: black;
text-decoration: none;
font-size: 1.2rem;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
border: 1px solid black;
}
<div class="screens">
<div class="screen">
<div class="header">
<div class="div-1">Div-1</div>
<div class="div-1">Div-2</div>
</div>
<div class="sit-container">
<div class="strip">
<div class="view">
<div class="view-1">View-1</div>
<div class="view-1">View-2</div>
<div class="view-1">View-3</div>
<div class="view-1">View-4</div>
</div>
</div>
<div class="button-section">
<a class="play-button">Play</a>
<a class="quit-button">Quit</a>
</div>
</div>
</div>
</div>