I have a list of products which can be in a bundle. I want to draw a border around each product which is part of the same bundle.
<ul>
<li class="bundle-1">Product 1</li>
<li class="bundle-1">Product 2</li>
<li class="bundle-2">Product A</li>
<li class="bundle-2">Product B</li>
<li>Product I</li>
</ul>
The border is around Product 1 & 2 and Product A & B. Exist a CSS Selector to group some elements?
[class*="bundle-"] {
border-left: 1px solid blue;
border-right: 1px solid blue;
}
[class*="bundle-"]:first-child {
border-top: 1px solid blue;
}
[class*="bundle-"]:last-child {
border-bottom: 1px solid blue;
}