I've inherited some HTML / CSS code. I'm trying to understand it to make it work. Currently, I'm stuck on some nested CSS definitions. A primitive version of the HTML looks like the following:
<ul class='nav-items'>
<li class='child-items'>
<a href='#'>Nav Item 1</a><br />
<a href='#'>Nav Item 2</a><br />
<a href='#'>Nav Item 3</a>
</li>
</ul>
The CSS associated with this looks like the following:
.nav-items {
.child-items a {
color:orange;
background-color:white;
font-size:16pt;
}
.child-items a:hover {
color:white;
background-color:orange;
}
}
The first CSS declaration (.child-items a) is working. I've confirmed this by changing the color from orange to black. However, the hover definition doesn't seem to work at all. Is there some limitation on nested style definitions? Is this approach even called nested css definition? I tried reading up on this syntactical approach however, I didn't have any luck Googling for what I thought it might be called.
Thanks