Answer the question
In order to leave comments, you need to log in
What is the correct media query for display:none?
It is necessary to hide the block on the ExtraSmall (cell-es) and Small (cell-s) screens.
If I add cell-es cell-s classes to the html markup, then everything works, but I would like to know:
1. How correct am I doing everything?
2. How to make a request correctly for one class.
<!--BEGIN [@Header/Top] Top-->
<div class="row__top">
<div class="cell cell__top cell-s">
<div class="main__top">
<div class="top__item">left</div>
<div class="top__item top__item--full">
mid
</div>
<div class="top__item mr-0">right</div>
</div>
</div>
</div>
<!--END [@Header/Top] Top-->
.row__top {
background: #ffde40;
}
.cell {
}
.cell__top {
box-sizing: border-box;
margin: 0 auto;
max-width: 1280px;
}
.main__top {
display: flex;
height: 56px;
align-items: center;
}
.top__item--full {
flex: auto;
justify-content: center;
}
.top__item {
display: flex;
margin-right: 16px;
}
/** BEGIN [@Media] **/
@media (max-width: 319px) {
.cell {
padding: 0 8px;
}
.cell-es {
display: none;
}
}
@media (min-width: 320px) and (max-width: 543px) {
.cell {
padding: 0 16px;
}
.cell-s {
display: none;
}
}
@media (min-width: 544px) and (max-width: 767px) {
.cell {
padding: 0 24px;
}
.cell-m {
display: none;
}
}
@media (min-width: 768px) and (max-width: 1011px) {
.cell {
padding: 0 32px;
}
.cell-l {
display: none;
}
}
@media (min-width: 1012px) {
.cell {
padding: 0 48px;
}
.cell-el {
display: none;
}
}
/** END [@Media] **/
Answer the question
In order to leave comments, you need to log in
/** BEGIN [@Media] **/
@media (max-width: 319px) {
.cell {
padding: 0 8px;
}
.cell-es {
display: none;
}
}
@mediagenia (max-width: 543px) {
.cell {
padding: 0 16px;
}
.cell-s {
display: none;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question