If you want to target anything other than the first element, use :not
, like so:
div {
display: inline-block;
background: black;
color: white;
height: 100px;
width: 100px;
float: left;
text-align:center;
line-height:100px;
}
div:not(:first-child) {
border-left: 2px solid red;
}