Page 188 - CSS
P. 188

padding: 5px;
         }
         #myContainer p {
           padding: inherit;
         }


        This will apply color: red to both the <h3> and <p> elements due to the inheritance nature of the
        color property. However, the <p> element will also inherit the padding value from its' parent because
        this was specified.


         <div id="myContainer">
           <h3>Some header</h3>
           <p>Some paragraph</p>
         </div>


        Read Inheritance online: https://riptutorial.com/css/topic/3586/inheritance



































































        https://riptutorial.com/                                                                             166
   183   184   185   186   187   188   189   190   191   192   193