Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

21 Mapping text formats to HTML/XML > 21.12 Converting list formats to HTML > 21.12.3 Indenting list items > 21.12.3.1 Adjusting the second-line list indent in CSS


21.12.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 FrameMaker 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 Mif2Go supports this method and provides rudimentary JavaScript (see §22.6.1 Selecting a CSS file at run time), this is not a standards-friendly approach.



21 Mapping text formats to HTML/XML > 21.12 Converting list formats to HTML > 21.12.3 Indenting list items > 21.12.3.1 Adjusting the second-line list indent in CSS