RKic
02-15-2012, 12:39 AM
Hi all,
This is the first time I'm trying to use imported graphics as buttons. I have a bunch of .png images for inactive buttons and rollover state buttons.
In my html I have each button area coded as follows:
<div id="nav"><a href="MainPage.html"><img alt="click here for homepage" src="images/navbarimages/inactbuts_03.png"></a>
<a href="productinfo.html"><img alt="click here for product info" src="images/navbarimages/inactbuts_07.png"></a>
and so forth...
Then in my CSS, I have the images for the nav div styled as such:
#nav img {
margin: 4.5%;
visibility: visible;
top: 122px;
left: 23px;
height: 53px;
border-style: none;
The graphics look great and position themselves just perfectly, but now I don't know how to make them change when I hover my mouse over them
do I need to create a #nav img:hover statement for each button? And then change the background image png for each?
I'm really having trouble wrapping my head around this.
This is the first time I'm trying to use imported graphics as buttons. I have a bunch of .png images for inactive buttons and rollover state buttons.
In my html I have each button area coded as follows:
<div id="nav"><a href="MainPage.html"><img alt="click here for homepage" src="images/navbarimages/inactbuts_03.png"></a>
<a href="productinfo.html"><img alt="click here for product info" src="images/navbarimages/inactbuts_07.png"></a>
and so forth...
Then in my CSS, I have the images for the nav div styled as such:
#nav img {
margin: 4.5%;
visibility: visible;
top: 122px;
left: 23px;
height: 53px;
border-style: none;
The graphics look great and position themselves just perfectly, but now I don't know how to make them change when I hover my mouse over them
do I need to create a #nav img:hover statement for each button? And then change the background image png for each?
I'm really having trouble wrapping my head around this.