Coreper Posted December 18, 2007 Report Share Posted December 18, 2007 ive got this image [Header_Logo.png] and i want to add a mouseover image [Header_Logo_Active.png] and a hyperlink [index.htm] to itdoes anyone know how to do this?here is my image code:<img border="0" src="../images/header/Header_Logo.png" width="280" height="260">note: i dont want to use javascript, i would really like to use NO scripts and simple codes...thanks in advance Quote Link to comment Share on other sites More sharing options...
Mike567 Posted December 18, 2007 Report Share Posted December 18, 2007 CSS a:hover{background-image:header.jpg;height:xxxpx;width:xxxpx;}you want to put it in a style tag Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted December 19, 2007 Report Share Posted December 19, 2007 Doesn't the alt text in the img tag automatically create mouse-over text?[img=../images/header/Header_Logo.png] Quote Link to comment Share on other sites More sharing options...
Mike567 Posted December 19, 2007 Report Share Posted December 19, 2007 He wants the image to change on a mouse hovering over it. Quote Link to comment Share on other sites More sharing options...
Coreper Posted December 19, 2007 Author Report Share Posted December 19, 2007 indeedbut how do i exactly need to do that:i dont really get what you said in your first post, Mike... Quote Link to comment Share on other sites More sharing options...
Mike567 Posted December 19, 2007 Report Share Posted December 19, 2007 Goes in head tag<style type="text/css">.hoverlink a:hover{background-image:url('hoverpic.png');width:xxxpx;height:xxxpx;}.hoverlink a{background-image:url('nonhoverpic.png');width:xxxpx;height:xxxpx;}</style>your link<a href="anotherpage.html" class="hoverlink"></a> Quote Link to comment Share on other sites More sharing options...
Coreper Posted December 19, 2007 Author Report Share Posted December 19, 2007 it doesnt workhere is what i did:i added to the body:<a href="home.htm" class="hoverlink"><img border="0" src="../images/header/Header_Logo.png" width="280" height="260"></a>i added to the header:<style type="text/css">.hoverlink a:hover{background-image:url('../images/header/Header_Logo_Active.png');width:280px;height:260px;}.hoverlink a{background-image:url('../images/header/Header_Logo.png');width:280px;height:260px;}</style>the image does show a hyperlink [in the status bar], but the image doesnt change when the mouse hovers above it... Quote Link to comment Share on other sites More sharing options...
Mike567 Posted December 19, 2007 Report Share Posted December 19, 2007 you dont need the img tag Quote Link to comment Share on other sites More sharing options...
Coreper Posted December 19, 2007 Author Report Share Posted December 19, 2007 but then it doesnt show anything... Quote Link to comment Share on other sites More sharing options...
Mike567 Posted December 19, 2007 Report Share Posted December 19, 2007 hmmm been a while try this<a href="site.html"><div class="hoverlink"></div></a> Quote Link to comment Share on other sites More sharing options...
Coreper Posted December 19, 2007 Author Report Share Posted December 19, 2007 still nothing... Quote Link to comment Share on other sites More sharing options...
Mike567 Posted December 19, 2007 Report Share Posted December 19, 2007 Have you actually got it up on the web if so send me a link and I will look at it. Quote Link to comment Share on other sites More sharing options...
Coreper Posted December 20, 2007 Author Report Share Posted December 20, 2007 no i havent got it up yetbuta friend of mine told me another, much easier way:<img border="0" name="Logo" src="../images/header/Header_Logo.png"onmouseover="Logo.src='../images/header/Header_Logo_Active.png'"onmouseout="Logo.src='../images/header/Header_Logo.png'" width="280" height="260">Thats exactly what i was looking for!!!thanks for the help though! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.