+ <p>A pixel is a fixed size for a particular screen. For instance, my MacBook Air is 1440x900px, which I confirmed by looking under the Apple logo for <code>About This Mac > Displays</code>. An equally common unit in web design is the <em>em</em>. An em is the font size that an element has, which is either inherited from its parent or set on the element itself. For instance, the body element by default inherits the font size of 16px that the html element has by default, so for the body element, 1em is 16px. The padding on the body has been styled to equal 1em, and you can see in the box model diagram in the style tab of Developer Tools that the padding on the body is 16px. Change the font size of the body and check what happens to the padding.</p>
0 commit comments