Pseudo-class :last-child not working

Pseudo-classe li:last-child not working if not in direct child.

:last-child NOT working

<ul>
    <a href=""><li>first child</li></a>
    <a href=""><li>middle child</li></a>
    <a href=""><li>last child</li></a>
</ul>

:last-child working

<ul>
    <li><a href="">first child</a></li>
    <li><a href="">middle child</a></li>
    <li><a href="">last child</a></li>
</ul>

Column

.content-archive-links-single {
    -webkit-column-count: 5; /* Chrome, Safari, Opera */
    -moz-column-count: 5; /* Firefox */
    column-count: 5;
  -webkit-column-width: 150px;
     -moz-column-width: 150px;
          column-width: 150px;
    -webkit-column-gap: 10px; /* Chrome, Safari, Opera */
    -moz-column-gap: 10px; /* Firefox */
    column-gap: 10px;
    -webkit-column-rule: 4px outset #ff00ff; /* Chrome, Safari, Opera */
    -moz-column-rule: 4px outset #ff00ff; /* Firefox */
    column-rule: 4px outset #ff00ff;
}

Resource:

List all tags outside loop

<h3>Tags</h3>
    <ul>
    <?php $tags = get_tags();
    if ($tags) {
    foreach ($tags as $tag) {
    echo '<li><a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a></li> ';
    }
    } ?>
    </ul>

List all categories outside loop

<h3>Categories</h3>
    <ul>
      <?php
      $args = array(
         'orderby' => 'slug',
         'parent' => 0
      );
      $categories = get_categories( $args );
      foreach ( $categories as $category ) {
         echo '<li><a href="' . get_category_link( $category->term_id ) . '" rel="bookmark">' . $category->name . '' . '' . $category->description . '</a></li>';
      }
     ?>
    </ul>

Resources: http://petragregorova.com/articles/customize-wp-categories-output/