css - Select elements with specific class in specific div -
lets have div class divclass, , have elements class elementclass. how can select elements class: elementclass in divs class: divclass?
depends,
does matter @ level elementclass situated in divclass?
if not, use:
.divclass .elementclass { //properties here }
if want select elementclass direct descendants of divclass, use:
.divclass > .elementclass { //properties here }
don't overspecify using div.divclass unless it's necessary.
Comments
Post a Comment