HTML and CSS Reference
In-Depth Information
Figure 3.7. This box is set to width: 40%, making its width 40% of the available horizontal space in which
it sits
The box is set to a width of 40% , and it's centered inside the available horizontal space.
Notice in Figure 3.8 what happens when we increase the available space. The width is still
set to 40% , but the box is wider, because the available horizontal space is larger.
Figure 3.8. This box is again set at 40% width, but it's larger because the available horizontal space it
sits in is larger
Some CSS properties take integers—that is, whole numbers—as values. We've already seen
an example of this when we applied a z-index value to our .logo element:
Search WWH ::

Custom Search