Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Line break on mobile phone only

I have a phone number on a website. It looks good on a laptop, but on a mobile device half of the number jumps to the next line. It doesn't look good.

So how can I create a line break that will only work on a mobile device sized screen?

I am not very experienced in coding, so please be specific :) Thanks a lot for any help!

like image 584
Henrik Avatar asked Jun 15 '16 13:06

Henrik


1 Answers

Why not just do a line break as a class in the
tag?

<br class="mobile-break">

and in CSS

    @media screen and (min-width: 600px)  {
        .mobile-break { display: none; }
    }
like image 157
Richard de Ree Avatar answered Sep 18 '22 17:09

Richard de Ree