0

I'm try to appply css in second div of toolbar class, but my css is applied in both div, so can you give me suggestion how to apply css for particular second div in toolbar class ?

Here is a screenshot, pleas check for better understanding.

enter image description here

1
  • You can get second class with .products-grid + .toolbar-products Update first match class with direct .toolbar-products {}
    – S.P
    Jul 10, 2022 at 13:54

2 Answers 2

0

In this case you can try to use CSS element1~element2 Selector for second element

// first toolbar
.toolbar.toolbar-products:first {
    // ...
}
// second toolbar
.toolbar.toolbar-products ~ .toolbar.toolbar-products {
     // ...
}
0

use + .toolbar-products for applied css.

.toolbar-products { color:yellow}
.products-grid + .toolbar-products { color:red}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.