On a dropdown menu from a search filter that shows a category with subcategories, I need to make the parent categories bold or some other formatting with CSS (black background, white font, etc).
Page where the problem can be seen: hidden link (middle column filter "Thema"). This is the built in WP category for posts. see screenshot
When I look in the Chrome inspector, there is no special CSS ID for parent entries.
I have submitted the access parameters for this database instance in another ticket, if you need to access it.
When I look in the Chrome inspector, there is no special CSS ID for parent entries.
No, and even if there were you would not be able to use it to style the option text. As far as I know select input options are styled by the device OS you're using and most CSS styles are ignored. Some older browsers would allow you to add minimal styles here, but those are no longer consistently applied to modern browsers and devices. There are some libraries out there that replace select input fields with style-able HTML elements, but those aren't supported here in the forums and would be rather tricky to implement in a custom search View.
https://stackoverflow.com/questions/7208786/how-to-style-the-option-of-an-html-select-element/7208814#7208814
If you can show me a working JSFiddle or pastebin with options styled by CSS classes, I'll be glad to take a closer look, but I think what you're asking for isn't possible in basic HTML.
Thanks for the explanation, I will relay this to the customer.