I'm having some issues with min-width
media queries. Right now everything works exactly as designed until the window screen becomes less than 375px
. Once the screen goes less than this, .list__content
reappears. Does anyone know how once it goes under 375px, it goes disappears?
Where is what I am hoping:
The window is less than or equal to 375px
-
.list__content
dissapears - ✅
.list__items
100% width
The window is between 375px and 768px
- ✅
.list__items, .list__content
50% width
The window is greater than 768px
- ✅
.list__items
33% and.list__content
is 66%
.list {
position: absolute;
height: 100%;
width: 100%;
background-color: #fff;
display: flex;
}
.list__items,
.list__content {
position: relative;
}
.list__items_header,
.list__content_header {
border-bottom: 1px solid black;
padding: 5px;
}
.list__items {
width: 100%;
border: 0;
}
.list__content {
width: 100%;
display: block;
}
@media (min-width: 375px) {
.list__items {
width: 100%;
border-right: 0;
}
.list__content {
display: none;
}
}
@media (min-width: 768px) {
.list__items {
width: 50%;
border-right: 1px solid black;
}
.list__content {
width: 50%;
display: block;
}
}
@media (min-width: 1032px) {
.list__items {
width: 33%;
border-right: 1px solid black;
}
.list__content {
width: 66%;
display: block;
}
}
<div class="list">
<div class="list__items">
<div class="list__items_header">i-h</div>
items
</div>
<div class="list__content">
<div class="list__content_header">c-h</div>
content
</div>
</div>