1

Мне нужно чтобы на мониторах с большим разрешением свойства:

max-height: 350px;
overflow-y: auto;

Не применялись когда ширина монитора начинается с 1000px, прописал следующее:

.main-section__sidebar__content {
   width: 100%;
   max-height: 350px;
   overflow-y: auto;
   color: #303133;
   font: 14px/17px 'latoregular', sans-serif;
}
@media (min-widh:1000px) and (max-width:3000px){

    .main-section__sidebar__content {
        max-height: none;
        overflow-y: visible;
    }
}

не понимаю в чем проблема, подскажите пожалуйста.

cheops
  • 19,454
  • 29
  • 48
  • 139

1 Answers1

1

Для max-height/max-width стоит использовать inherit

@media screen and (min-width: 1000px) and (max-width:3000px) { ... max-height: inherit; ... }

.main-section__sidebar__content { 
  width: 100%; 
  max-height: 350px; 
  overflow-y: auto; 
  color: #303133; 
  font: 14px/17px 'latoregular', sans-serif;
}

@media screen and (min-width: 1000px) and (max-width:3000px){

.main-section__sidebar__content { max-height: inherit; overflow-y: visible; }

}

<div class="main-section__sidebar__content">


</div>
SVE
  • 22,387