Saturday, September 26, 2015

vertical align middle a tag in several li tag with float:left attribute

.cd-tabs-navigation {
    margin: 0;
    padding: 0;
    display: block;
}
.cd-tabs-navigation:after {
    content: "";
    display: table;
    clear: both;
}
.cd-tabs-navigation li {
    float: left;
    display: table-cell;
    width: 20%;
    height: 50px;
    line-height: 50px;
    background: #fff;
    border-right: 1px solid #D6D6D6;
    border-bottom: 1px solid #D6D6D6;
    overflow: hidden;
    vertical-align: middle;
}
.cd-tabs-navigation a {
    display: inline-table;
    text-transform: uppercase;
    text-align: center;
    font-size: 11px;
    color: #4e4d4d;
    width: 100%;
    line-height: 1;
    padding: 0 15px;
    margin: auto 0;
    vertical-align: middle;
}
.cd-tabs-navigation a:hover {
    color: #b42d32;
}
.cd-tabs-navigation li.selected {
    background-color: #b42d32 !important;
    color: #FFF;
}
.cd-tabs-navigation li.selected a, .cd-tabs-navigation li.selected a:hover {
    color: #FFF;
}

No comments: