User:Windinthew/Multi-column lists
From Audacity Development Manual
< User:Windinthew
Revision as of 00:36, 10 November 2012 by Windinthew (talk | contribs) (moved Test to User:Windinthew/Multi-column lists: Moved into user space)
Contents
These are unordered lists. There are further considerations with ordered lists not explored here.
Multiple lists side-by-side formatted in a table
NVDA reads as two downwards-ordered lists (and does not mention "table"), but David B did not point to this solution and suggested it was better not to put a list inside a table.
|
|
Multiple div-separated lists floated side-by-side
- Aloe
- Bergamot
- Calendula
- Damiana
- Elderflower
- Feverfew
- Ginger
- Hops
- Iris
- Juniper
- Kava kava
- Lavender
- Marjoram
- Nutmeg
- Oregano
- Pennyroyal
/* position list chunks side by side */
div.wrapper
{
float: left;
width: 10em;
}
/* clear float after lists */
br
{
clear: left;
}
/* anchor styling */
ol li a
{
display: block;
width: 7em;
text-decoration: none;
}
ol li a:hover
{
color: #FFF; /* white */
background-color: #A52A2A; /* brown */
}
A single list wrapped with margin-left and negative margin-top
- Aloe
- Bergamot
- Calendula
- Damiana
- Elderflower
- Feverfew
- Ginger
- Hops
- Iris
- Juniper
- Kava Kava
- Lavender
- Marjoram
- Nutmeg
- Oregano
- Penny Royal
/* separate the list from surrounding elements */
ol
{
margin: 0 0 1em 2em;
padding: 0;
}
ol li
{
/* Stipulate the height of each item so that
vertical return = items * height */
line-height: 1.2em;
/* Clear the default margins & padding
so we can style the list from scratch */
margin: 0;
padding: 0;
}
/* If li position is left static, Internet
Explorer disables hyperlinks in the list
in all but the final column.
This rule will be processed only by
Internet Explorer because only IE believes
that there’s a level above HTML: */
* html ol li
{
position: relative;
}
/* horizontal position of each column */
ol li.column1 { margin-left: 0em; }
ol li.column2 { margin-left: 10em; }
ol li.column3 { margin-left: 20em; }
/* Bring the first item of each column
back up to the level of item 1.
Vertical return = items * height.
Here, 5 items * 1.2em line-height = 6em */
li.reset
{
margin-top: -6em;
}
A single list styled into multiple columns
Recommended by David B but he says not supported by IE until IE10
- apple
- carpet
- geography
- mountain
- nowhere
- postage
- ragged
- toast