Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't hide a <br> in Bootstrap

For some reason I can't hide the <br> tags only show up on small screen sizes. It doesn't show up for small screens. It works for the other screen sizes. It works for other tags. Something about the <br> tags with the small screen size.

 <div class="row">
  <img src="static/works_3.jpg" class="img-responsive works-photo col-md-4 col-sm-12"><br class="hidden-xs hidden-md hidden-lg">
  <img src="static/works_3.jpg" class="img-responsive works-photo col-md-4 col-sm-12"><br class="hidden-xs hidden-md hidden-lg">
  <img src="static/works_3.jpg" class="img-responsive works-photo col-md-4 col-sm-12"><br class="hidden-xs hidden-md hidden-lg">
 </div>
like image 289
Scott Avatar asked Sep 30 '15 00:09

Scott


People also ask

Can I remove BR tag in CSS?

Remove <br> Line Break with CSS and Replace with Space To do this we'll use CSS to change the content of the br tag which will prevent it from making a line break. Then we'll also add content using the :after pseudo-element. That will ensure the <br> tag is replaced with a space.

What can I use instead of a BR tag?

Instead of using the <br> tag, you should use a semantic HTML element and the CSS margin or padding properties if necessary.

How do I hide mobile view in bootstrap?

Hiding elements Avoid creating entirely different versions of the same site, instead hide element responsively for each screen size. To hide elements simply use the .d-none class or one of the .d-{sm,md,lg,xl}-none classes for any responsive screen variation.


2 Answers

change <br> to <div class="hidden-xs hidden-md hidden-lg"></div>

it should help

like image 197
sglazkov Avatar answered Oct 28 '22 02:10

sglazkov


These clases hidden-md etc. has been dropped from stable Bootstrap 4. Use these instead: .d-sm-none .d-md-block

like image 27
lukyer Avatar answered Oct 28 '22 01:10

lukyer