deelite
deelite

Reputation: 355

How to indent text on 2nd line in list elements with icon fonts

I use an icon font for list style elements:

.desc.std li:before {
  content: '\e81e';
  font-family: 'icons';
  width: .6em;
}

But when the text breaks to 2nd line, I have no text indent.

Can anyone please tell me, how I can get the 2nd and following lines indented?

Upvotes: 1

Views: 2725

Answers (1)

insertusernamehere
insertusernamehere

Reputation: 23580

Here's a possible solution if applicable for your situation:

CSS

li {
    position: relative;
    padding: 0 0 0 20px;
}

li:before {
    content: '\e81e';
    position: absolute;
    left: 0px;
    font-family: 'icons';
}

Demo

Try before buy

Upvotes: 5

Related Questions