To right-align (left-alignment will be the default), you can use text alignment: right on your span. To make this responsive use of media queries, to apply it only on large screens:
@media (min-width:768px) { .text-right-responsive {text-align:right;} .text-left-responsive {text-align:left;} }
HTML:
<div class="container"> <div class="row"> <div class="span6 text-right-responsive">A (right-aligned)</div> <div class="span6 text-left-responsive">B (left-aligned)</div> </div> </div>
See also: fooobar.com/questions/48809 / ... since version 2.3. Twitter Bootstrap also has text classes. So you can use: <div class="span6 text-right">A (right-aligned)</div> . Also this class does not respond. text-right adds text-align: directly to the style of your element. Therefore, you need media queries to reset. reset text alignment for small screens:
@media (max-width:767px) { .text-right {text-align:left;} .text-left {text-align:left;} }
The pull-right / pull-left classes add to the float element. Therefore, to use them, you will need an additional shell:
<div class="container"> <div class="row"> <div class="span6"><span class="pull-right">A (right-aligned)</span></div> <div class="span6"><span class="pull-left">B (left-aligned)</span></div> </div> </div>
In this case, you can also use media queries. Now you need to reset the float for small screens:
@media (max-width:767px) { .pull-right {float:none;} .pull-left {float:none;} }
DEMO: http://bootply.com/66024
source share