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

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -