Make visible and invisible div tag in bootstrap
2 answers
Take a look at the Bootstrap Responsive Utility at http://getbootstrap.com/css/#responsive-utilities .
In this particular case, you can, for example, use a class visible-xs-block
to make it <div>
visible only on the xs breakpoint used for mobile phones, and a class hidden-xs
to make it <div>
visible on all other breakpoints.
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="visible-xs-block">only visible on xs</div>
<div class="hidden-xs">visible on everything but xs</div>
+3
source to share
You can use media queries. For example, you can use:
<style>
@media (max-width: 600px) {
.my-div {
display: none;
}
}
</style>
More info here: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
+1
source to share