user2520410
user2520410

Reputation: 479

CSS - why doesn't -webkit-padding disappear after list-style-type: none;?

I'm wondering about this CSS command, what does it mean, where does it come from? I think it is from the list-style-type. But doesn't it disappear, when I turn list-style it off?

HTML

<ul>
   <li></li>
</ul>

-webkit-padding-start: 40px;

CSS

ul, menu, dir {
    display: block;
    list-style-type: disc;
    -webkit-margin-before: 1em;
    -webkit-margin-after: 1em;
    -webkit-margin-start: 0px;
    -webkit-margin-end: 0px;
    -webkit-padding-start: 40px;
}

Upvotes: 2

Views: 1467

Answers (2)

BenM
BenM

Reputation: 53198

From CSS Infos:

Provides the width of the starting padding.

If the writing direction is left-to-right, this value overrides padding-left. If the writing direction is right-to-left, this value overrides padding-right.

If you wish to turn off padding on a <ul> or <ol> list, you'll need to use:

ul, ol {
    padding: 0
}

Upvotes: 1

user2952265
user2952265

Reputation: 1630

The ul elemten has be default a padding and a margin. You simply have to set:

margin:0;
padding:0;

Upvotes: 1

Related Questions