- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Hide content depending on screen size with Bootstrap
Use the .hidden-* class in Bootstrap to hide content depending on screen size with Bootstrap
Example
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <p class = "show">This is visible.</p> <p class = "hidden">This is hidden.</p> <h1 class = "hidden-sm bg-info">Hidden on small screen</h1> <h1 class = "hidden-md bg-warning">Hidden on medium screen</h1> </body> </html>
- Related Articles
- Hide content with Bootstrap
- Create a flexbox container on a specific screen size with Bootstrap 4
- Display flex items horizontally on a specific screen size in Bootstrap
- Create an inline flexbox container on a specific screen size in Bootstrap 4
- Show content with Bootstrap
- Show flex items right aligned and horizontally in Bootstrap 4 on a specific screen size
- Hide Bootstrap Modal
- Create a block element on a specific screen width with Bootstrap 4
- Hide popover using Bootstrap .popover("hide") method
- Changing Layouts Based on Screen Size using CSS
- Set key content with Bootstrap 4 card
- Bootstrap .modal("hide") method
- Bootstrap .tooltip("hide") method
- Changing Column Width Based on Screen Size using CSS
- Display the collapsible content by default with Bootstrap

Advertisements