It is necessary that the block is not shown if the browser size is less than 1200px. I tried using @media like this:

@media screen and (width: 1200px) { .mCSB_scrollTools { display:none !imporatnt; } } 

But it does not work, I think I incorrectly made a condition. What is better to use?

  • So ? @media screen and (max-width: 1199px) .mCSB_scrollTools {display: none! imporatnt; }} - zb '
  • No, it does not work, even set the window to 600 px - Happy_Cougar
  • Try this @media (max-width: 1200px) { .mCSB_scrollTools { display:none !important; } } @media (max-width: 1200px) { .mCSB_scrollTools { display:none !important; } } - Goldy

1 answer 1

In your example !important is written with an error.

Open the snippet to the whole page and change its size, when you reduce the window to 800 pixels, the text disappears.

 @media all and (max-width: 800px) { .mCSB_scrollTools { display:none; } } 
 <div class=mCSB_scrollTools>Пропадающий блок</div>