CSS nth child on list items

html div block with unordred list items.

<div id="my-div">
        <li>item 1</li>
        <li>item 2</li>
        <li>item 3</li>

css to make the list to layout the item horizonally, hightlight the second item and remove the default bullet points in front of each item.

#div ul li
    float: left;
    list-style: none;

#div ul li:nth-child(2)
  • item 1
  • item 2
  • item 3

Search within Codexpedia

Custom Search

Search the entire web

Custom Search