html CSS style second line spacing

Post Reply
chris
Site Admin
Posts: 194
Joined: Mon Jul 21, 2008 9:52 am

html CSS style second line spacing

Post by chris »

Hi,

I would like that a second line (and following lines) has an indent.
So that the first line is more to the left than the other lines.

Code: Select all

<ul>
  <li>Text</li>
  <li>Text</li>
  <li>Reeeeaaaaaaal loooooooooooooooooooooong tttteeeeexxxxtt  and it has a second line.</li>
</ul>
chris
Site Admin
Posts: 194
Joined: Mon Jul 21, 2008 9:52 am

Re: html CSS style second line spacing

Post by chris »

Found a solution.

Code: Select all

li {
    list-style-type: disc;
    list-style-position: inside;
    text-indent: -4em;
    padding-left: 5em;
}
Post Reply