Unordered List (
    ) default indent

前端 未结 8 1545
忘了有多久
忘了有多久 2020-12-03 10:15

Can anyone tell me why an unordered list has a default indent/padding applied to it? Can this be solved with a CSS Browser Reset?

相关标签:
8条回答
  • 2020-12-03 10:35

    It has a default indent/padding so that the bullets will not end up outside the list itself.

    A CSS reset might or might not contain rules to reset the list, that would depend on which one you use.

    0 讨论(0)
  • 2020-12-03 10:43

    Typical default display properties for ul

    ul {
        display: block;
        list-style-type: disc;
        margin-before: 1em;
        margin-after: 1em;
        margin-start: 0;
        margin-end: 0;
        padding-start: 40px;
    }
    
    0 讨论(0)
提交回复
热议问题