How to create an active category

How do we add active category in select element to the list of options we have?

As we have ‘All’ category highlighted here, how can we add that it in our code?

1 Like

Hi @mfurquan.sal ,
In this assignment, you can give that element an id or class and apply CSS as directed, and also you can add a hover effect to all elements so that the background and font colours change when they hover by giving the class name “active.”

#active { color:#fff; background-color:#0084ff;

If it needs to work for the item you selected, then we have to use some JavaScript code here.


Thanks for the clarification.

1 Like