PDA

View Full Version : image replacement problem


sugata_bhar
03-21-2006, 11:11 AM
<div id="logoimage">
<h2 id="imgtop" ><a href="#" >This is the text</a></h2>
</div>



#imgtop
{

background-repeat:no-repeat;
width:776x;
margin-bottom:0px;
margin-top:0px;
height: 128px;
text-indent: -5000px;


}
#imgtop a
{
background-image:url(images/innertop_new.gif);
background-position: 0 0;
}
#imgtop a:hover
{

background-position: 0 -128;
}


The problem is that the image doesnt show.But i need it as the background of the <a href>

_Aerospace_Eng_
03-21-2006, 11:13 AM
Well its not going to because you used text indent. You could try putting the text outside of the anchor in the h2 then make the link display:block;

Can you post a link to your site or at least attach the background image?

sugata_bhar
03-21-2006, 11:31 AM
Thank you very much
just display:block in the anchor did the trick