How to hide elements in a responsive layout with HTML and Bootstrap?

Spread the love

Sometimes, we want to hide elements in a responsive layout with HTML and Bootstrap.

In this article, we’ll look at how to hide elements in a responsive layout with HTML and Bootstrap.

How to hide elements in a responsive layout with HTML and Bootstrap?

To hide elements in a responsive layout with HTML and Bootstrap, we can use Bootstrap’s responsive classes.

For instance, we write

<div class="d-none d-md-block">This will show in medium and up</div>

to add a div that shows as a block element only on a screen that has width that meets the md breakpoint with d-none and d-md-block.

Conclusion

To hide elements in a responsive layout with HTML and Bootstrap, we can use Bootstrap’s responsive classes.

Leave a Reply

Your email address will not be published.