Levie
02-25-2011, 03:10 AM
I'm using css to create dynamic rollovers of a gif image
this is my html for that part
<div id="menu2">
<a id ="testi" href="testimonials.html"><span>Testimonials</span></a>
<a id ="testi" href="testimonials.html"><span>Testimonials</span></a>
</div>
and the css
#menu2 {
width:900px;
margin-left:10%;
}
#testi
{
display:block;
width:200px;
height:100px;
background-image:url(testimonials.gif);
background-repeat:no-repeat;
}
#testi:hover
{
background-position: 0 -100px;
}
#testi span
{
display: none;
}
This code makes the rollovers work fine and everything, but I can't get them to sit next to each other horizontally.
I've tried doing
#menu2 a{
display:inline;
}
but that just makes the images disappear.
any advice?
this is my html for that part
<div id="menu2">
<a id ="testi" href="testimonials.html"><span>Testimonials</span></a>
<a id ="testi" href="testimonials.html"><span>Testimonials</span></a>
</div>
and the css
#menu2 {
width:900px;
margin-left:10%;
}
#testi
{
display:block;
width:200px;
height:100px;
background-image:url(testimonials.gif);
background-repeat:no-repeat;
}
#testi:hover
{
background-position: 0 -100px;
}
#testi span
{
display: none;
}
This code makes the rollovers work fine and everything, but I can't get them to sit next to each other horizontally.
I've tried doing
#menu2 a{
display:inline;
}
but that just makes the images disappear.
any advice?