-4

See the website http://www.localjobpool.com I would like to hide the green top bar in mobi le view. Staring code of div tag is:

<div id="info">
    <div class="menuHolder">

    </div>
</div>

menuHolder and nav are defined in my custom CSS. I tried the solution like @media screen......

like

@media screen and (max-width: 500px) {
    .info .menuHolder .nav {
        display: none
    }    
}

Please tell me how I can hide this bar in mobile view. And where should I insert the code suggested by you...

Minar Mahmud
  • 2,289
  • 6
  • 18
  • 29
bonny
  • 1
  • Try this link if it helps [Link](http://stackoverflow.com/questions/11381673/detecting-a-mobile-browser) – Abhi Mar 21 '15 at 12:12

3 Answers3

0

That should work...

@media screen and (max-width: 500px) {
.menuHolder{
display: none;}
}
dippas
  • 49,171
  • 15
  • 93
  • 105
Medda86
  • 1,413
  • 1
  • 11
  • 17
0
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
 .menuHolder {display:none;}
}

also info is id and not class ( #info .menuHolder )

@media screen and (max-width: 500px) {
#info .menuHolder{
display: none;}
}
iMMuNiTy
  • 426
  • 7
  • 18
0

Try this media query, it should target all tablets and smartphones. Maybe you can modify its values to adjust to your needs:

@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
  only screen and (-o-min-device-pixel-ratio: 13/10),
  only screen and (min-resolution: 120dpi) {

    .info .menuHolder .nav {
      display: none;
    }

}

Or the same devices, only on landscape:

 @media only screen and (-webkit-min-device-pixel-ratio: 1.3) and (orientation : landscape),
    only screen and (-o-min-device-pixel-ratio: 13/10) and (orientation : landscape),
    only screen and (min-resolution: 120dpi) and (orientation : landscape) {

      .info .menuHolder .nav {
        display: none;
      }

}

Worked perfectly for me.

Source: https://gist.github.com/marcedwards/3446599

chimos
  • 648
  • 2
  • 13
  • 34