Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make visible and invisible a div tag in bootstrap

My question is very very simple.(I am a beginner in the css/html/javascript)

I would like to hide a div in mobile browser and show that div in the other devices (PC&Laptop).

how can I do?

like image 741
S.M_Emamian Avatar asked Sep 06 '25 03:09

S.M_Emamian


1 Answers

Take a look at the responsive utilities documentation of Bootstrap at http://getbootstrap.com/css/#responsive-utilities.

In this specific case you could for example use the class visible-xs-block to make a <div> only visible on the xs breakpoint that's used for mobile phones, and the class hidden-xs to make a <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>
like image 198
ckuijjer Avatar answered Sep 07 '25 19:09

ckuijjer