ruk·si

🎨 CSS
All But Last -problem

Updated at 2016-01-02 16:41

Supported by all browsers after IE8.

Example

Markup

<div class="nav">
    <div class="nav-item">Home</div>
    <div class="nav-item">Pricing</div>
    <div class="nav-item">Projects</div>
    <div class="nav-item">About</div>
</div>
.nav .nav-item {
    display: inline-block;
}
.nav .nav-item:not(:last-child) {
    padding-right: 5px;
    border-right: 1px solid #666;
}

Souce