NightLightW
Active Member
Hello,
I learn CSS on one site (maybe you now which) but i have problem with code. Here is what i need to do
So problem is when i click to "compile" this i see error
Where is the main problem? I cant find any error in code.
Thanks for help.
I learn CSS on one site (maybe you now which) but i have problem with code. Here is what i need to do
So problem is when i click to "compile" this i see error
Code:
[COLOR=crimson]Oops, try again.
[COLOR=#F80]Are we missing some brown colour eyes.[/COLOR][/COLOR]
Thanks for help.
and here is mu codeI love my daughter. One day I'm "daddy", the next day "dada". However CSS is not quite as forgiving.
CSS selectors separated by a " " (space) are known as descendant selectors. For example
div div p { }
This declaration will only affect the <p> element if its nested within 2 or more levels of the <div> element
Please forgive my understanding of genetics, but I have created a simple family tree with <span> elements which represent that person's eye color.
I have targeted one span with a descendant selector with a high specificity (131, 100 + 10 + 10 + 10 + 1) for you
Create more descendant selector declarations to set the color property of each span so that it matches the colour that is described in the spans content.
Code:
<style>
#familytree .granddad .sonfather span {color:blue;}
#familytree .granddad .sonfather .son span {color:gray;}
#familytree .granddad .daughterwife span{color:#A52A2A}
#familytree .granddad .daughterwife .son span{color:#A52A2A}
#familytree .granddad .son span {color:green;}
</style>
<div id="familytree">
<div class="granddad">
<div class="sonfather">
<span>My Eye Colour is Blue</span>
<div class="son">
<span>My Eye Colour is Gray</span>
</div>
</div>
<div class="daughterwife">
<span>My Eye Colour is Brown</span>
<div class="son">
<span>My Eye Colour is Brown</span>
</div>
</div>
<div class="son">
<span>My Eye Colour is Green</span>
</div>
</div>
</div>