Center text - Burguer Project

Please, the body p is not centering as it should. The description of the burguer is always to the left, even after setting text-align: center; and margin: 18px 0;

here is the css:

.body p {
  color: #333333;
  font-weight: 100;
  line-height: 34px;
  margin: 15px center;
  text-align: center;

here is the html:

 <div class="body">
        Our BBQ Bacon Burger features our special house ground blend of wagyu and sirloin, spiced perfectly, and finished off with just a drop of white truffle oil. A butter grilled brioche bun layered with roasted red onion, perfectly crispy pork belly, and our hickory smoked BBQ sauce.

here is a pic of the alignment I mentioned:

Hi there.

In your CSS, center is not a valid value for the margin: property. You can specify a length (10px), a percentage (5%), or auto. :slight_smile:

Nice, thank you. But the text is still more to the left. If I adjust margin valid values, it doest work. Even If i can adjust and get a valid space from the left corner of the screen, the same space is also applied to the right side, more the space that is already there. Would you tell me how can i finally center the text, please?
Thank you.

did you try margin: auto?

1 Like