0

I've got an image that is displayed when viewing the website on a computer; however, I want it to be hidden when the site is viewed on a mobile device. I've just used the 'display: none;' CSS but for some reason it's not working.

HTML:

<div class="col-sm-7 col-sm-offset-1">
      <img src="./images/testing.jpg" alt="">
</div>

CSS:

.col-sm-7 {
    display:none;
}

Thank you.

IronMocha
  • 7
  • 2

2 Answers2

1

Just add the class hidden-xs and/or hidden-sm.

See the docs for more info

jeffjenx
  • 17,041
  • 6
  • 57
  • 99
1

Try using Bootstrap Responsive Utilities

.hidden-xs

<div class="col-sm-7 col-sm-offset-1 hidden-xs">
  <img src="./images/testing.jpg" alt="">
</div>
amflare
  • 4,020
  • 3
  • 25
  • 44