CSS help
Out of context: Reply #8
- Started
- Last post
- 8 Responses
- CAJTBr0
i once did a big site with a nav something like this. for each link i had 3 divs. each div was positioned absolute, the top div contained a transparent gif and had a z-index of 3, the second contained the regular text, was set to visible as default and had a z-index of 2, the third contained the mouseover text and had a z-index of 1.
so the animated gif was the actual link, and in that you have something like onMouseOver="show('whatever'); return true" onMouseOut="hide('whatever');...
and then stick in a function show which hides the normal layer and shows the mouseover layer, and hide which does the opposite.
the advantage of this is that you can choose how big your hit area is with the gif; you don't have to bother including visited, active, hover states as the text isn't an actual link; you can put all the code into the gif href, rather than splitting it over two links.