Template:Flatlist/doc
This page uses content from Wikipedia. The original article was at Template:Flatlist. The list of authors can be seen in the page history. |
{{Flatlist}} provides a WCAG/ISO-standards-compliant accessible alternative to comma- or dash- (or other single character-) separated lists.
Usage
{{flatlist}} creates a horizontal list, such as:
For navigation boxes using {{navbox}}, one can set and achieve the same styling without using this template. For image captions, list (i.e. asterisk) markup does not work, so consider using {{hlist}} instead.
Examples
{{flatlist | *[[goblin]] *[[horse]] *[[dog]] *[[pig]] }}
produces:
Syntax for ordered lists
{{flatlist| # [[first]] # [[second]] # [[third]] # [[fourth]] # [[fifth]] # [[sixth]] }}
produces:
Parameters
- class (optional)
- adds a CSS class to the containing div.
- style (optional)
- adds CSS styling to the containing div. Complex styles should not be used in articles but may be acceptable on user, project, and talk pages.
- indent (optional)
- indents the list by a number of standard indents, one indent being 1.6em. (Useful in an indented discussion thread.)
Technical details
This template uses the .hlist
CSS class defined in MediaWiki:Common.css to generate horizontal lists. It causes ordinary HTML list items to be displayed inline (horizontally), where they would normally display as block elements (vertically). The class also generates the interpuncts between list items and parentheses around nested lists. Some of the CSS used is not compatible with all browsers, notably Internet Explorer 6 and 7.
See also
- {{hlist}}