Answers for "centering text in div box"

CSS
10

center text in div container

text-align: center
Posted by: Guest on June-01-2020
0

center text in div

<style>
  .my-div{
  	text-align:center
  }
</style>
....
<div class="my-div">
  <p>this is text </p>
</div>
Posted by: Guest on April-18-2022

Browse Popular Code Answers by Language