Skip to content Skip to sidebar Skip to footer

Bootstrap Left Align Text Inside Centered Div

I have a paragraph of 4 lines that are poetry in a centered div. Because it is poetry, I need the 4 lines aligned left, but not to the left side of the div. Here is how it is cente

Solution 1:

Here is the solution http://jsfiddle.net/YW7eS/2/

I removed text-align: center and used the grid system to give you more control.

<divclass="col-lg-offset-4 col-lg-4 col-md-offset-4 col-md-4 col-sm-offset-4 col-sm-4">
    ...
</div>

Solution 2:

Maybe you want to show us the code, but you probably want to do text-align:left on the paragraphs.

Solution 3:

Since you don't provide any code its quite hard to help you, but this is (I guess) what you want. Change the left padding to whatever number to increase/decrease the distance of the text to the div.

.poetry {
   padding: 00020px;
}

.poetryp {
   text-align: left;
}

Solution 4:

just try something like this:

<divstyle="width: 500px; height: 500px; float: left;"></div><divstyle="float: left; margin-left: 30px;">
  Lorem ipsum dolor sit amet, 
  onsectetur adipisicin.
  Doloribus, totam unde facilis omnis 
  temporibus nostrum in
</div>

Solution 5:

you can change the code like this,

.marketing.col-md-4 {
  text-align: left;
  margin-bottom: 20px;
}

see the working fiddle here

Post a Comment for "Bootstrap Left Align Text Inside Centered Div"