I need to apply CSS to a specific class and id of an element like this.
<div class="contents" id="contents">
I tried
#contents .contents { ... }
but it doesn’t seem to work.
How to apply the css for a specific class and id ?
ADDED
With
#contents.contents {...}
It works OK.
… should work fine. The problem is likely somewhere in code that you haven’t shared with us.
… means “An element that is a member of class
contentsthat is a descendent of an element with the idcontents“