Exercise
We are going to be creating an ‘icon’ type div that could be used on our homepage as a quick link to another page on our website. Using the background-image manipulation techniques we have learned above:
The final output should look something like Figure 5.10.
5.10
Background attachment introduces a new concept that we haven’t seen before. This concept is fixed positioning. Fixed positioning is where an element on a webpage remains where it is regardless of where the user has scrolled. The best way to understand this is to see it in action. Let’s run through a quick exercise to highlight exactly what we mean when we say fixed positioning. First, open up your CSS file in your text editor of choice, then add the following snippet to the end of your code: