Looking through bootstrap it looks like they support collapsing the menubar items for smaller screens. Is there something similar for other items on the page?
For example, I have a along with nav-pills floated right. On a small screen this causes issues. I'd love to at least put it into a similar click-to-show-more dropdown.
Is this possible within existing Bootstrap framework?
To hide an element in a responsive layout, we need to use the CSS display property set to its "none" value along with the @media rule. The content of the second <p> element having a "hidden-mobile" class will be hidden on devices smaller than 767px.
Once the browser/screen reaches 600pixels then #title_message will become hidden. EDIT: if you are using another CSS for mobile then just add the visibility: hidden; to #title_message . Hope this helps you! That fixed it.
For the purpose of hiding elements with media queries you simply have to set their display to none inside the specific media query.
Look, instead of using visibility: hidden; use display: none; . The first option will hide but still takes space and the second option will hide and doesn't take any space.
Extra small devices Phones (<768px) (Class names : .visible-xs-block, hidden-xs)
Small devices Tablets (≥768px) (Class names : .visible-sm-block, hidden-sm)
Medium devices Desktops (≥992px) (Class names : .visible-md-block, hidden-md)
Large devices Desktops (≥1200px) (Class names : .visible-lg-block, hidden-lg)
Below is deprecated as of v3.2.0
Extra small devices Phones (<768px) (Class names : .visible-xs, hidden-xs)
Small devices Tablets (≥768px) (Class names : .visible-sm, hidden-sm)
Medium devices Desktops (≥992px) (Class names : .visible-md, hidden-md)
Large devices Desktops (≥1200px) (Class names : .visible-lg, hidden-lg)
Much older Bootstrap
.hidden-phone, .hidden-tablet
etc. are unsupported/obsolete.
UPDATE:
In Bootstrap 4 there are 2 types of classes:
hidden-*-up
which hide the element when the viewport is at the given breakpoint or wider.hidden-*-down
which hide the element when the viewport is at the given breakpoint or smaller.Also, the new xl
viewport is added for devices that are more then 1200px width. For more information click here.
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