Which of the following values can be assigned to list-style-position property inside or outside?

list-style-position

The list-style-position CSS property sets the position of the ::marker relative to a list item.

It is often more convenient to use the shorthand list-style.

Note: This property is applied to list items, i.e., elements with display: list-item;. By default this includes

  • elements. Because this property is inherited, it can be set on the parent element [normally
      or
        ] to let it apply to all list items.

        Note that there is variance among browsers regarding behavior when a block element is placed first within a list element declared as list-style-position: inside. Chrome and Safari both place this element on the same line as the marker box, whereas Firefox, Internet Explorer, and Opera place it on the next line. For more information on this, see bug36854.

        CSS list-style-position Property

        Previous Complete CSS Reference Next


        Example

        Specify the position of the list-item markers:

        ul.a {
        list-style-position: outside;
        }

        ul.b {
        list-style-position: inside;
        }

        Try it Yourself »

        CSS list-style Property

        Previous Complete CSS Reference Next


        Example

        Specify all the list properties in one declaration:

        ul {
        list-style: square inside url["sqpurple.gif"];
        }

        Try it Yourself »

        Video liên quan

  • Bài mới nhất

    Chủ Đề