css - Change text-align responsively (with Bootstrap 3)? -
i'm using bootstrap 3 blog. in custom css, added
body { text-align: justify; ... }
i result on bigger screens (tablet, desktop). on small screens (phone), justified text doesn't work due narrower columns plus blog's occasional use of long-ish-technical-terms-like-this
.
can responsively have text-align: justify
only on bigger screens?
is possible solely via css, or, need write custom js so?
yes, (where breakpoint set @ 48em):
body{ text-align: left; } @media screen , (min-width: 48em){ body{ text-align: justify; } }
the second rule override first if viewport width greater 48em.
Comments
Post a Comment