V
V
Vladimir2015-10-29 12:54:30
css
Vladimir, 2015-10-29 12:54:30

How to specify different alignment for different resolutions in bootstrap 3?

There is a line with 2 columns, when the screen is xs, can I somehow change the text-align for h3 to center? Without resorting to overriding bootstrap styles, is there a native solution?

<div class="col-md-6 col-sm-6 col-xs-12">
  <h3 class="text-left"></h3>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
  <h3 class="text-right"></h3>
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
holfza, 2015-10-29
@holfza

<h3 class="text-left text-center-xs"></h3>
<h3 class="text-right text-center-xs"></h3>
@media screen and (max-width: 767px) {
  .text-center-xs {
    text-align: center!important;
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question