Welcome visitor
* Login
* Register
It is currently March 18th, 2019, 3:26 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 6 posts ] 
Author Message
  mouse over image on a table
PostPosted: March 7th, 2009, 11:13 pm 

Posts: 61
Hello people,

what can i do to show a picture when the mosue is over, everything inside a table?

my table looks like this:
<table><tr>
        <td><a href="image1.jpg">image1</a></td>
        <td><img src="image1.jpg"></td>
</tr></table>

thanks for your help.


Top
 Profile  
 
  Re: mouse over image on a table
PostPosted: March 7th, 2009, 11:19 pm 
User avatar

Posts: 112
<script>
function show(){document.getElementById("image1").style.display="inline";}

function hide(){document.getElementById("image1").style.display="none";}
</script>

<table><tr>
        <td><a href="image1.jpg" onMouseOver="show();" onMouseOut="hide();">image1</a>image1</a></td>
        <td id="image1" style="display:none;"><img src="image1.jpg"></td>
</tr></table>


Top
 Profile  
 
  Re: mouse over image on a table
PostPosted: March 7th, 2009, 11:23 pm 

Posts: 61
thanks for the quick respones, now i have another question. when the mouse is over the link, the link moves down when the image appears, what can i do to keep it on the same place?


Top
 Profile  
 
  Re: mouse over image on a table
PostPosted: March 7th, 2009, 11:26 pm 
User avatar

Posts: 37
try
<td valign="top">
      <a href="image1.jpg" onMouseOver="show();" onMouseOut="hide();">image1</a>
</td>


Top
 Profile  
 
  Re: mouse over image on a table
PostPosted: March 7th, 2009, 11:29 pm 
User avatar

Posts: 112
yep


Top
 Profile  
 
  Re: mouse over image on a table
PostPosted: March 7th, 2009, 11:30 pm 

Posts: 61
thanks guys, i really appreciate it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron