Hi all,
I would like to add custom css on particular categories.
How do I access to particular categories in CSS and customise?
Hi all,
I would like to add custom css on particular categories.
How do I access to particular categories in CSS and customise?
Hi !
You can use CSS to target attribute, in your case: data-category-id.
But i think that attribute it wil change after you create/delete one categories.
tr[data-category-id="3"] {
background-color: red;
}
Hi SSebastian,
Thanks for your reply! Do you happen to know how I can achieve in javascript? I would like to do implement in the script! Thanks for your reply again
P.S
I have added the line below and it does not seem to work…
document.querySelectorAll(‘tr[data-category-id=“3”]’)[0].style.display = “none”;
Why you want to use JavaScript instead of CSS?
Don’t use JS if your task can be done only with CSS. It’s not logic.