Is it [list-style-type] or [list-style:] and which is used in css?
It would benefit you to review the pages linked here on the Mozilla Developer Network, where they explain both of these properties and several related ones.
list-style is just the shortcut version of [list-style-type]
ol.normal {
list-style-type: upper-alpha;
}
/* or use the shortcut "list-style": */
ol.shortcut {
list-style: upper-alpha;
}
Not quite. list-style
is a shorthand that includes information about list-style-type
, list-style-position
and list-style-image
.
You can either set values for all of those separately, or set the values all together with the list-style
shorthand.
but, If i only need it just for one, for [none] as in no style, the short is good for that, or no?
Yeah, I almost always use just the shorthand. Sometimes you just have to be careful to make sure you understand what the browser thinks you mean. If you just use list-style: none
, you need to check that the browser will understand what you mean by none
—because list-style stands for 3 separate things.
In this case, if you use just none
, the browser will probably assume that you mean you want to override the default list-style-type of disc
—meaning that the ul
will display without bullets.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.