I am using twitter bootstrap 3.0
. When resolution of the screen gets changed to smaller the menu changed to mobile view. I have a div
contained slider with images, so I want to hide that div
when my menu changed to mobile view (when screen resolution small).
I tried to apply css
classes on my div visible-desktop visible-tablet
but it is not working.
Is there other way I can do?
See Display property - Hiding elements
To hide an element on extra-small (portrait mobile) screen widths, use
<div class="d-none d-sm-block">
That is hidden by default (.d-none
) but visible on small or larger devices.
If you're using Bootstrap v3, they changed the responsive utility class names. See http://getbootstrap.com/css/#responsive-utilities
You probably want .hidden-xs
This was also documented in Migrating from 2.x to 3.0
Consider using media queries. Something like
@media screen and (max-width:480px) {
.mydiv {display:none}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With