I read somewhere a class inside another class is written in this way: .class1 .class2 { style}. But I found it counld not work.
For example:
<style>
h1 p {
background-color: yellow;
}
.a1 .a2{
background-color: green;
}
</style>
<h1><p>Welcome to My Homepage</p></h1>
<p class="a1">
<p class="a2"> My name is Donald </p>
<p class="a3"> I live in Duckburg.</p>
</p>
As you can see, the following is supposed to be green. But it actually not.
<p class="a1"><p class="a2"> My name is Mike </p> </p>
Am I missing anything here?