*{margin:0;padding:0; box-sizing: border-box;} div{padding:50px;} ul{ height:40px; width:400px; } ul li{ float:left; width:100px; height:40px; line-height:80px; border-bottom:1px solid #ccc; text-align: center; list-style:none; } ul li:first-child{ border-left:1px solid #ccc; } ul:nth-child(2n) li{ float:right } ul:nth-child(2n) li:first-child{ border-right:1px solid #ccc; border-left:none; } ul:first-child li{ border-left:none; }