srdalxMI Posted September 28, 2009 Share Posted September 28, 2009 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 More sharing options...
dsonesuk Posted September 28, 2009 Share Posted September 28, 2009 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 More sharing options...
srdalxMI Posted September 29, 2009 Author Share Posted September 29, 2009 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 More sharing options...
srdalxMI Posted September 29, 2009 Author Share Posted September 29, 2009 ups...never mind, classical "forget a letter" mistake I forgot to put an "a" for linkage.Thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.