Good day guys , i have an enquiry regarding Exercise 7 of Make a Website (A Closer Look at CSS).
I would appreciate your help alot.
em: A relative value that changes in proportion to the size of the parent element. For example, if a parent element has font-size: 20px;, child elements with font-size: 1em; would be equivalent to 20px. Child elements with font-size: 0.5em; would be equivalent to 10px (a halving) and so on.
4.Now let’s resize anchor elements that are children of elements with the “hero” class using em values.
In main.css locate the .hero a selector. Change the font-size property to 1.25em;.
Click Run to see the anchor element’s size decrease.
Question: There hasn’t been any font size indicated for its parent element .hero , so how did em work on the selector .hero a?