nihilater
10-03-2009, 05:19 AM
I have this buttons right here:
http://rodsyconstruction.com/tryButs.html
and you see when I rollover a button, the rollover image isn't aligned in a proper way. I have this html code:
<div id="navi_panel">
<div id="navimask">
<ul>
<li id="nav1"><a href="#">left</a></li>
<li id="nav2"><a href="#">home</a></li>
<li id="nav3"><a href="#">webs</a></li>
<li id="nav4"><a href="#">photos</a></li>
<li id="nav5"><a href="#">adders</a></li>
<li id="nav6"><a href="#">readers</a></li>
<li id="nav7"><a href="#">right</a></li>
</ul>
</div>
</div>
and this CSS
#navi_panel
{width:600px; height: 83px; margin: 0px auto; padding:0px;}
#navimask ul
{
display:block;
float:right;
width:535px;
height:83px;
background:url(images/image_sprite.png) no-repeat 0 0;
list-style:none;
}
#navimask li
{
display:block;
height:83px;
float:left;
}
#nav1
{width:71px;}
#nav2
{width:81px;}
#nav3
{width:81px;}
#nav4
{width:81px;}
#nav5
{width:81px;}
#nav6
{width:69px;}
#nav7
{width:71px;}
#navimask ul li a {
display:block;
width:100%;
height:100%;
text-indent:-9999px;
outline:none;
}
li#nav1 a:hover {
background: url(images/image_sprite.png) no-repeat 0 -83px;
}
li#nav2 a:hover {
background:url(images/image_sprite.png) no-repeat -71px -83px;
}
li#nav3 a:hover {
background:url(images/image_sprite.png) no-repeat -152px -83px;
}
li#nav4 a:hover {
background:url(images/image_sprite.png) no-repeat -233px -83px;
}
li#nav5 a:hover {
background:url(images/image_sprite.png) no-repeat -314px -83px;
}
li#nav6 a:hover {
background:url(images/image_sprite.png) no-repeat -395px -83px;
}
li#nav7 a:hover {
background:url(images/image_sprite.png) no-repeat -464px -83px;
}
I know I have placed the positions on x-axis right, but I have a problem with the y-axis. I don't know how to place the rollover image to move a little on the left so that it will be aligned when i rollover on it. thanks. Hope anyone can help.
http://rodsyconstruction.com/tryButs.html
and you see when I rollover a button, the rollover image isn't aligned in a proper way. I have this html code:
<div id="navi_panel">
<div id="navimask">
<ul>
<li id="nav1"><a href="#">left</a></li>
<li id="nav2"><a href="#">home</a></li>
<li id="nav3"><a href="#">webs</a></li>
<li id="nav4"><a href="#">photos</a></li>
<li id="nav5"><a href="#">adders</a></li>
<li id="nav6"><a href="#">readers</a></li>
<li id="nav7"><a href="#">right</a></li>
</ul>
</div>
</div>
and this CSS
#navi_panel
{width:600px; height: 83px; margin: 0px auto; padding:0px;}
#navimask ul
{
display:block;
float:right;
width:535px;
height:83px;
background:url(images/image_sprite.png) no-repeat 0 0;
list-style:none;
}
#navimask li
{
display:block;
height:83px;
float:left;
}
#nav1
{width:71px;}
#nav2
{width:81px;}
#nav3
{width:81px;}
#nav4
{width:81px;}
#nav5
{width:81px;}
#nav6
{width:69px;}
#nav7
{width:71px;}
#navimask ul li a {
display:block;
width:100%;
height:100%;
text-indent:-9999px;
outline:none;
}
li#nav1 a:hover {
background: url(images/image_sprite.png) no-repeat 0 -83px;
}
li#nav2 a:hover {
background:url(images/image_sprite.png) no-repeat -71px -83px;
}
li#nav3 a:hover {
background:url(images/image_sprite.png) no-repeat -152px -83px;
}
li#nav4 a:hover {
background:url(images/image_sprite.png) no-repeat -233px -83px;
}
li#nav5 a:hover {
background:url(images/image_sprite.png) no-repeat -314px -83px;
}
li#nav6 a:hover {
background:url(images/image_sprite.png) no-repeat -395px -83px;
}
li#nav7 a:hover {
background:url(images/image_sprite.png) no-repeat -464px -83px;
}
I know I have placed the positions on x-axis right, but I have a problem with the y-axis. I don't know how to place the rollover image to move a little on the left so that it will be aligned when i rollover on it. thanks. Hope anyone can help.