.labels > ul {
    margin: 0; 
    padding: 0;
    list-style: none;
    display: block;
    float: none;
}
.labels > ul > li {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #CCC;
    overflow: hidden;
    text-indent: -2000px;
}
.labels > ul > li.selected,
.labels > ul > li:hover { border: 1px solid #000; }
.labels > ul > li + li { margin-left: 5px; }
.labels > ul > li.label1 { background: red; }
.labels > ul > li.label2 { background: green; }
.labels > ul > li.label3 { background: blue; }
.labels > ul > li.label4 { background: yellow; }
