Assad Nazar
Assad Nazar

Reputation: 1464

css for mobile device not working well

I am using bootstrap which I have converted into wordpress theme using this example. Website url is fuenterprises.com My customized css for navbar is:

.navbar-wrapper {
  margin-top: 33px;
}

.navbar-wrapper .navbar {
  margin: 0 0 0 100px;
  width: 91.3%;
}

.navbar-brand-logo {
  float: left;
  font-size: 18px;
  height: 50px;
  line-height: 20px;
  padding: 1px 0 0 0;
}

.featurette-heading {
  margin-top: 0;
}

.featurette-heading a {
  color: inherit;
}

.img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img {
  display: block;
  height: auto;
  max-width: 100%;
  border: 1px dashed;
}

Now, When I open the site in mobile device, is not showing up menu as expected, see the screenshot: mobile screenshot

Question is how can I disable image in mobile devices?

Upvotes: 0

Views: 347

Answers (1)

Niels van Renselaar
Niels van Renselaar

Reputation: 1512

Wrap it in a container

<div class="disable-on-mobile"> <!-- my image --> </div>

And add a CSS with a media query (depending on when you want to hide it change the width)

@media (max-width: 900px){

  .disable-on-mobile {
    display: none;
  }

}

You can also just add the class to your image...

Upvotes: 1

Related Questions