g2k556
11-13-2006, 02:13 PM
I am wanting to make a navbar. for the links i want pictures, and i want the picture to change when you hover over it. i know there is a way to do this with javascript, but i don't like js because it's kind of messy. so i am wanting to use css. i've made one attempt at this and it was successful only half way. It worked perfect in FF but in IE the links didn't work.
Here's my css i used:
.home {visibility:visible !important; display: block; width: 152px; height: 49px;}
a.home td{width: 152px; height: 49px; visibility: visible !important; display: block; position:absolute; top: 375px; left: 200px;}
a.home:link td {background-image: url(http://i108.photobucket.com/albums/n11/g2k556/MySpace/Home.png);}
a.home:active td {background-image: url(http://i108.photobucket.com/albums/n11/g2k556/MySpace/Home.png);}
a.home:visited td {background-image: url(http://i108.photobucket.com/albums/n11/g2k556/MySpace/Home.png);}
a.home:hover td {background-image: url(http://i108.photobucket.com/albums/n11/g2k556/MySpace/HomeHover.png);}
Here is the code i used to make the links, i was experimenting with ways to do this and found this worked. but then i went IE and it didn't.
<a class="home" href="http://home.myspace.com/index.cfm?fuseaction=user&MyToken=a63c7923-8cb0-4a95-afc9-fd02a28a3ed0">
<table height="49" width="152" border="0">
<tr>
<td>
</td>
</tr>
</table>
</a>
Here's my css i used:
.home {visibility:visible !important; display: block; width: 152px; height: 49px;}
a.home td{width: 152px; height: 49px; visibility: visible !important; display: block; position:absolute; top: 375px; left: 200px;}
a.home:link td {background-image: url(http://i108.photobucket.com/albums/n11/g2k556/MySpace/Home.png);}
a.home:active td {background-image: url(http://i108.photobucket.com/albums/n11/g2k556/MySpace/Home.png);}
a.home:visited td {background-image: url(http://i108.photobucket.com/albums/n11/g2k556/MySpace/Home.png);}
a.home:hover td {background-image: url(http://i108.photobucket.com/albums/n11/g2k556/MySpace/HomeHover.png);}
Here is the code i used to make the links, i was experimenting with ways to do this and found this worked. but then i went IE and it didn't.
<a class="home" href="http://home.myspace.com/index.cfm?fuseaction=user&MyToken=a63c7923-8cb0-4a95-afc9-fd02a28a3ed0">
<table height="49" width="152" border="0">
<tr>
<td>
</td>
</tr>
</table>
</a>