Center text in frist projct

I almost done with my first project and still can’t find why my body text is not in the center. Who can help me? https://codepen.io/mayaliberman1/full/xdYJdb/

Maybe try putting the “style =“text-align: center”” tag on the de div class, on the CSS tab like so:

div {
text-align: center;
}

I’m also a noob, so I’m just recommending what I can think of

I would also recommend putting your list in a div tag, giving it an id or class, and using text-align: center in the CSS tab.

Codepen is using Bootstrap 4 and the col-xx-offset format you’re using is for Bootstrap 3.

BS4 has a different format.

A quick fix for your project is remove BS4, and instead use the older Bootstrap 3. Then your cols and col-offset classes would work as you expected.

 </div>
  <br>
  <br>
<div class="containter">
  <div class="row">
 <div class="col-xs-8 col-sm-10 col-sm-offset-1 col-md-8 col-offset-md-2">

Having that text in a “containter” isn’t doing it any favours. I changed it and it moved away from the left but still wasn’t centred. I’d say fix that and then fiddle with the columns/follow above advice.

Elaborating on Owel’s point…

In Bootstrap 4, the syntax for the offset class is different. Rather than “col-offset-xx-num”, the syntax is “offset-xx-num”.

In other words, rather than this line of code:

<div class="col-xs-8 col-sm-10 col-sm-offset-1 col-md-8 col-offset-md-2">

you should have this line of code:

<div class="col-xs-8 col-sm-10 offset-sm-1 col-md-8 offset-md-2">

You can read more about offsets in Bootstrap 4 here:

1 Like

Thank you so much, it really helped me!
I am very new to bootstrap, so it is a challange for me.
Thanks again.