HINT
TIP
231
Correct the problem by offsetting the background image using the background posi-
tion style.
Click Preview Description.
Move the mouse over the images to see the effect.
14
14
15
15
16
16
What Do Those Numbers Mean?
The first number in the background position is the movement to the left.
Because all these images are along the left of the overall image, you don’t
need to change that. The others are the number of pixels down you want
to move the image; each individual image (and border) is 70 pixels high.
Because you’re actually moving it up, you use negative numbers.
TIP
See
next
page
14
14
Click
15
15
Mouse
rollover
16
16
HINT
INTRODUCTION
Add the background for links you’ve already visited by using the :visited pseudo-
class and showing the right side of the background image.
Click Preview Description.
Notice that the links you’ve already visited have a faded background but they get the
full background when you roll over them. Links you haven’t visited don’t have any
background at all.
232
PART 10
TIP
The Four Link States
You can set the appearance for links in four states. For a normal, unvisited
link, just set a style for the link itself. For the link after it has been visited,
use the :visited pseudoclass. For the link while you have the mouse over
it, use the :hover pseudoclass. For the link while you’re clicking it, use the
:active pseudoclass.
17
17
18
18
19
19
End
17
17
Click
19
19
18
18

Get Easy HTML for eBay now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.