li ul li is too long, line wraps but no indention

前端 未结 4 1753
野趣味
野趣味 2020-12-09 10:17

I\'ve an unordered HTML list (ul). If the second word is too long the line wraps automatically but the overflowing text isn\'t indented. Any ideas how to solve

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 10:28

    Replace your indent with padding

    padding-left: 2em;
    text-indent: -2em;
    

    Should do the trick

提交回复
热议问题