HTML and CSS Reference
In-Depth Information
don't worry too much about the parts of the code you don't yet understand; just focus on the
parts being discussed.
Px Units
We've come across the px, or pixels, unit of measurement many times already. It represents
tiny squares that make up all elements on a web page:
.example {
width: 200px;
}
To see what I'm referring to, Figure 3.6 shows a screenshot of part of the RecipeFinder logo,
but zoomed in 1600% in Photoshop.
Figure 3.6. The RecipeFinder logo zoomed in to show the pixels
At this magnification it's easy to see that the logo is made up entirely of those tiny squares,
or pixels. Pixels are the most common type of unit you see in CSS.
Em Units
The em unit is a little complicated to grasp at first, but once you get the hang of it, it's very
useful:
Search WWH ::




Custom Search