Wednesday, February 25, 2015

To add white space before element's content?

Solution 1:

p {
  text-indent: 10px;
}


Solution 2:

use the unicode of a non breaking space.

p::before {
  content: "\00a0 ";
}

Solution 3:

p::first-letter {
  border-left: 1em solid red;
}

No comments: