html - Styling a div with ID inside a div with specific class -
i have written css file style div id, inside div classes. looks this
div.class1.class2 > div#id1{ styling rules }
but nothing happening div id1. appreciate , can't change structure of html or apply other ids or classes elements.
<div class="class1 class 2"> <div id="id1"></div> </div>
ids should used once, if followed convention target id in selector , not concern parent container it's in...
#id1 { // code }
but because of you're asking implies have id being used more once, suggest changing class before moving forward; however, if still wanted keep html way is, need this...
.class1 #id1 { // code }
Comments
Post a Comment