Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove last border-bottom?

I use li to show a list of records.

Each li has a bottom-border:1px solid black;

but I don't want to show border at the end of li?

example:

.test li{
        height:1%;
        overflow:hidden;
        padding:4px 0;
        margin:-1px 0 0;
        border-bottom: 1px solid black;
    }

.test li.last { border-bottom: none;  }

<ul class="test">
  <li> Foo 1 </li>
  <li> Foo 2 </li>
  <li> Foo 3 </li>
</ul>

Foo 3 still showing bottom border.

like image 356
user622378 Avatar asked Feb 20 '11 14:02

user622378


1 Answers

.test li{
        height:1%;
        overflow:hidden;
        padding:4px 0;
        margin:-1px 0 0;
        border-bottom: 1px solid black;
    }

.test li:last-child { border-bottom: none;  }
like image 70
Robin Maben Avatar answered Oct 20 '22 09:10

Robin Maben