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

Popular posts from this blog

4x4 Matrix in Python -

python - String indices must be integers and while issue -

wso2is - WSO2 IS 5.0.0 SP1 After restart there is authentication error -