Andy C
Andy C

Reputation: 71

How to align content to the left or right using bootstrap?

I am trying to achieve a similar look to paypal.com's page. I am having trouble right aligning some of my content. I have a cover bg for each section, but I need the content to shift left and right.

Upvotes: 0

Views: 381

Answers (4)

gamini2006
gamini2006

Reputation: 299

I am not 100% understand your question, but as align in paypal.com modify your div as below

<div class="pull-right section col-md-6 light text-left">

add "pull-right" and make it "text-left"

Hope this is helpfull!!!

Upvotes: 4

Smith Foto
Smith Foto

Reputation: 159

NOTE: this was removed in Bootstrap 3.

Pre-Bootstrap 3, you could use the CSS class pagination-centered like this:

 <div class="span12 pagination-centered">
 Centered content.
 </div>

Class pagination-centered is already in bootstrap.css (or bootstrap.min.css) and has the only one rule:

   .pagination-centered{text-align:center;}

With Bootstrap 2.3.0. just use class text-center

Upvotes: 0

Enjayy
Enjayy

Reputation: 1074

I am not really sure what you are trying to achieve. You should elaborate and and a little better so that we can help

.text-center, .text-right, .text-left, .pull-right, .pull-left 

are all helper methods in bootstrap for positon also look into using the grid

Upvotes: 2

Nilesh Mahajan
Nilesh Mahajan

Reputation: 3516

in bootstrap there are some specific classes to text alignment

.text-left{
 /* Text align left */
}
.text-right{
 /* Text align right*/
}
.text-center{
 /* Text align center*/
}

Using above mentioned classes you can align content aswell as inline-elements in your layout. you should also check bootstrap documentation on the same topic http://getbootstrap.com/css/#type-alignment

Upvotes: 2

Related Questions