Reputation: 11
a{
border-radius: 0;
}
a:first-child a{
border-radius: 10px 10px 0 0;
}
a:last-child a{
border-radius: 0 0 10px 10px ;
}
Moreover, all elements between them are without rounding. The fact is that the number of these elements is always different, from one to infinity. Question! How to round all edges with CSS if there is only one element?
Upvotes: 1
Views: 41
Reputation: 239
I think this would work for your example:
a{
border-radius: 0;
}
a:first-child a{
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
a:last-child a{
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
Upvotes: 1