EXPRESSIONENGINE First, create (Web server logs) the background image. Be very
Sunday, September 30th, 2007EXPRESSIONENGINE First, create the background image. Be very careful to keep the dimensions as specified in Figure 4-22. You will use CSS positioning to shift this image up and down by the appropriate number of pixels, showing a tick or arrow as required. For example, the hover state specifies the image be moved up by 20 pixels, thus hiding the first 15px bar and 5px space of the image and making the bar with the arrow visible on rollover. For a visited link, everything moves up 40 pixels, making the bar with the tick viewable instead. 243px 15px5px60px4 Figure 4-22. Dimensions for ticked-off background image The CSS is pretty simple and is making full use of the display:block and set width discussed earlier. Just replace the #sidebar ul and list links styles with the following. Be sure to enter the correct path to your ticks image: #sidebar ul { list-style-type:none; padding:3px; } #sidebar li a { display:block; line-height:150%; width:243px; background:URL(http://localhost/images/ticks.gif); text-decoration:none; } #sidebar li a:link, a:active { color:#336; } #sidebar li a:hover { color:#000; background-position: 0 -20px; } #sidebar li a:visited { background-position: 0 -40px; } 163