##### 30.11.3.1 Adjusting the second-line list indent in CSS

You can use CSS to adjust the second-line indent of a list format to match the first line. Using CSS is tricky, because CSS1 provides no equivalent of the autonumber-tab-hang construct; the tab concept is missing from CSS. Therefore, spacing between the bullet or autonumber and the text is browser dependent.

To use CSS with <ol> or <ul> tags, you must deduct from your CSS indent the amount of indent applied automatically by the browser, or you will see your <li> items sliding away to the right like elections in Florida. How much you deduct is browser dependent, so you cannot have one CSS for all browsers. Instead you must play the JavaScript detection game to select among multiple CSS files at run time. Although DITA2Go supports this method and provides rudimentary JavaScript (see §31.6.1 Selecting a CSS file at run time), this is not a standards-friendly approach.

Previous Topic: 30.11.3 Indenting list items

Next Topic: 30.11.3.2 Inserting spaces between first-line list autonumber and text

Parent Topic: 30.11.3 Indenting list items

Sibling Topics:

30.11.3.2 Inserting spaces between first-line list autonumber and text

Table of Contents • Index