I have a menu with dropdown submenu. The parent items are styled differently to the children but how do I do that without having to overide the parent styles on the children?
For example in the code below I don't want the children to have a hover colour and the padding and line-height of the parent. How do I specify this without having to write all of that css again for the children?
It should be noted that there are no problems styling id and the whole purpose of using id on an element is because it's not reusable.
Being careful with id and classes inside it is no different than being careful with anything. It's a trend, lately, to tell people not to use id on elements. While I agree that using id should be limited, one should not fear using it.