Paragraph floats outside div & can't center div (using Bootstrap 3) - SOLVED

Paragraph floats outside div & can't center div (using Bootstrap 3) - SOLVED
0

#1

Exactly what the title says! Here’s the codepen:


#2

That is because there are no spaces in your

contents that the browser can wrap your text. right now it just sees it as one long word.

If you add some spaces, it is indeed wrapping and centered properly.


#3

facepalm thanks. any clue about how to center the div within the section?


#4

add float:none; to your css for the div.

You need to include that on any div you want to center in Bootstraps 3.0.1

Like so:

#about-me-div {
  margin: 0 auto;
  height: 400px;
  border: 2px black solid;
  font-size: 14px;
  text-align: center;
  float: none;
}

#5

got it, thanks a lot @rycankun