• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Link Effects, Lists, and Nav... > Horizontal List Navigation with Imag...

Horizontal List Navigation with Images

Just as you could swap images in the background with vertical lists, you can do the same thing with horizontal lists. I made a few modifications to the previous style sheet: I added the link and hover state background images. Then I bolded the font and set its color to white for both the link and hover states, to allow for good contrast as the image is swapped upon mouseover (see Example 10-14).

Example 10-14. List navigation using background images

body {font: bold 14px Georgia, Times, serif; color: black; }
ul#navlist {margin-left: 0; padding-left: 0; white-space: nowrap;}
#navlist li {display: inline; list-style-type: none;}
#navlist a { padding: 3px 10px; }
#navlist a:link, #navlist a:visited {color: white;  background-image: 
url(linkback.gif); text-decoration: none;}
#navlist a:hover {color: white; background-image: url(linkhover.gif); text-decoration: none;}

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint