bulleted list with different indentation

后端 未结 2 1938
一整个雨季
一整个雨季 2021-02-08 02:55

Can I make bulleted lists on my site that use

    and
  • tags have a different indentation distances?

    • Element One
    • Element Two
    • and ev
相关标签:
2条回答
  • 2021-02-08 03:23
    <ul style="padding-left:20px">
        <li>Element 1</li>
        <li>Element 2</li>
    </ul>
    

    I think the default indentation is 40px, this halves it.

    0 讨论(0)
  • 2021-02-08 03:42
    li {
      margin-left: 10px;
    }
    ul li{ 
      margin-left: 20px;
    }
    

    A slightly cleaner way to adjust both of the indentations. Margin and padding differ, so use whichever suits you best.

    0 讨论(0)
提交回复
热议问题