The problem is this: there is a block that does not need to be displayed on phones, tablets. How to do it with CSS ?? I understand that the question may be the simplest, but ... Thank you in advance.

  • hidden-xs add a class if you use the bootstrap =) - Serge Esmanovich
  • @korolariya, Unfortunately, your option did not work (well, or my hands are crooked =)) But, anyway, thank you very much - DaVinchi

3 answers 3

there are 2 methods

  1. via css

example

@media screen and (max-width: 600px) { #chto_ne_pozavivat { visibility: hidden; display: none; } } 
  1. via js

example

 <script type="text/javascript"> var mobile = (/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())); if (mobile) { alert("Мобильное устройство!!"); $('.navWrap').css('display', 'none'); // или можно $('.navWrap').hide(); } else { alert("НЕ мобильное устройство!"); } </script> 
  • Why at the same time visiblity and display? - Qwertiy
  • <div id = "audioplayer287" style = "width: 149px; height: 53px;" > </ div> but somehow you can stuff it all into the block itself ??? Ps I apologize for the stupid questions) - DaVinchi
  • @Qwertiy who will choose what you need. not necessarily what both were. - Saidolim
  • @DaVinchi did not understand the question. Do you need only one block? make for one block no problem. - Saidolim
  • @DaVinchi, no. Media queries, pseudo-elements and pseudo-classes cannot be placed in inline-style. Only separate css. - Qwertiy

Use media query for screen width.

Do not use the handheld version - it is outdated and will not work on most devices.

     .fixed1 { display: inline; } /* Smartphone Portrait and Landscape */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px){ .fixed1 { display: none; }} 

    Added to css