0

As mentionned, I would like to not have a property on a div on mobile device.

I have done that so far, which works with chrome but probably not with other browsers :

 <div collapse="true" class="visible-xs">
 <div class="hidden-xs">
    ...
 </div>

What's the correct way to do this ? Is there a way I can get away without using js ?

Thanks

Scipion
  • 11,449
  • 19
  • 74
  • 139

1 Answers1

1

When you say 'not have a property on a div', do you mean how to hide a div on a mobile device? If so the second div in the snippet should work cross-browser thanks to the class="hidden-xs".

The first div in the snippet will only be shown on devices with viewports which fall within the xs range (<768px based on an unmodified build of Bootstrap 3).

Using what you've written would show the user separate content based on the device's viewport size.