<p class="text">40px of padding-left</p>
.text {
  /*margin auto will center the text in the middle of the page*/
  margin: auto;
  font-size: 20px;
  text-align: center;
  width: 30%;
  border: 2px solid red;
  padding-left: 40px;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.