On my page I have a number of listviews
.
Some contain a single list item, some contain more than one item. I'm looking for a way to set top/bottom borders depending on number of list items in a CSS only way.
So in a single item list, borders should be:
listitem > border-top & border-bottom
Two item lists
listitem > border-top
listitem > border-top & border-bottom
Three+ item list
listitem > border-top
listitem > border-top & border-bottom
listitem > border-bottom
Right now I have this CSS
.inputList li:not( .inputList li:first-child, .inputList li:last-child) {
border-top-width: 1px;
border-bottom-width: 1px;
}
.inputList li:first-child {
border-bottom-width: 1px;
}
.inputList li:last-child {
border-top-width: 1px;
}
But this doesn't take me very far and I'm using not:
which I would rather try to avoid (for lack of IE support)
Any idea if this is at all possible?
Thanks!