inherit keyword : inherit : Style Basics HTML CSS TUTORIALS


HTML CSS TUTORIALS » Style Basics » inherit »

 

inherit keyword


 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title> Property Inheritance </title>
        <style type='text/css'>
          div#parentdiv {
          border: thin solid black;
      }
      div#childdiv {
          border: inherit;
      }
        </style>
    </head>
    <body>
    <div id='parentdiv'>
         This div has a border around it.
        <div id='childdiv'>
            This div also has a border around it.
        </div>
    </div>
    </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Style Basics
» inherit