Jump to content

Image Replacement Problem


srdalxMI
 Share

Recommended Posts

Hello,I am new at html/css world and still learning.I found that image replacement tehnique is better to use than pure img's. But I encoutered a problem. I used this code for html//<a href="http://dagr.200u.com/Index.html"><span>Home</span></a></div>//and this for css://div.index { background-image:url(http://dagr.200u.com/Graphics/buttons/01_Home.png); background-repeat:no-repeat; height:65px;}span {display:none;}//I noticed that when I choose not to display span's my links (<a href>) aren't hyperlinked anymore. I suppose that's because of "span {display:none;}" code. Is this correct?If it is - what is the solution for that? Thank you for any comments.Regards,SRx

Link to comment
Share on other sites

you don't need the text of 'home', just assign image background to anchor, set it as display: block; and give width and height of image, see belowdiv.index a { display:block;background-image:url(http://dagr.200u.com/Graphics/buttons/01_Home.png);background-repeat:no-repeat;height:65px;width:281px;}<div class="index"><a href="http://dagr.200u.com/Index.html"></a></div>

Link to comment
Share on other sites

Thank you for your reply...It sound very logical, but my links don't work, you can check it out here - http://dagr.200u.com/Index.html

you don't need the text of 'home', just assign image background to anchor, set it as display: block; and give width and height of image, see belowdiv.index a { display:block;background-image:url(http://dagr.200u.com/Graphics/buttons/01_Home.png);background-repeat:no-repeat;height:65px;width:281px;}<div class="index"><a href="http://dagr.200u.com/Index.html"></a></div>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...