-1

why doesn't the text get centered? it becomes on the right edge what should i change?

   .text4 {
      width: 762px;
      height: 714px;
      font-size: 24px;
      line-height: 40px;
      color: #273d46;
      font-family: "Times New Roman";
      text-align: center;
  }
<div class="text4">
      Donec aredsed odio dui. Morbi leo risus, porta ac consectetur ac, vestibulum
      at eros. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec
      ullamcorper nulla non metus auctor fringilla.
      Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean eu leo 
      quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
</div>

 
Sato Takeru
  • 1,669
  • 4
  • 12
  • 27
sleep231
  • 1
  • 1

1 Answers1

0

in this code text should be aligned center. I think your text4 position is not center. try like this

.text4 {
      width: 762px;
      height: 714px;
      font-size: 24px;
      line-height: 40px;
      color: #273d46;
      font-family: "Times New Roman";
      text-align: center;
      margin:auto;
}
Sato Takeru
  • 1,669
  • 4
  • 12
  • 27