ClickStart logo CSS to the point

Formatting nested lists

You can use contextual selectors to format nested lists. The following table includes the contextual selectors for one level of nested lists.

Contextual Selector

Example

ol ol

  • item 1
    • item A
    • item B
  • item 2

ol ul

  • item 1
    • item A
    • item B
  • item 2

ul ul

  • item 1
    • item A
    • item B
  • item 2

ul ol

  • item 1
    • item A
    • item B
  • item 2

Code

ul ul { color: blue; }
ul ol { color: green; }
ol ol { color: red; }
ol ul { color: yellow; }

Example

Click here to see an example.