B.61. list-style-position

As shown in Figure B-3, list-style-position controls whether or not the markers for list elements hang in the margin of list items or appear within the block.

Figure B-3. Effects of list-style-position

Inherited: Yes

See also: Section B.59list-style

B.61.1. Value

inside or outside

Initial value: outside

B.61.2. Compatibility

CSS Version: 1

This property works in all CSS-compatible browsers, with the notable exception of Netscape 4.

Internet Explorer 4 for Macintosh exhibits rendering glitches when this property is set to inside.

B.61.3. Example

This style rule sets lists of class compact to display markers within the rectangular block of the list item text and removes the associated left margin:

ul.compact, ol.compact {
  list-style-position: inside;
  margin-left: 0;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.40.207