Welcome visitor
* Login
* Register
It is currently May 23rd, 2019, 8:53 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  hide-display text
PostPosted: March 16th, 2009, 4:27 pm 
User avatar

Posts: 37
Hi, how can i show text inside an image when the mouse is over that image? Thanks.


Top
 Profile  
 
  Re: hide-display text
PostPosted: March 16th, 2009, 4:55 pm 
User avatar

Posts: 44
to write text over an image you may use absolute position for the text or the image, but i highly recommend to avoid that. instead of that, why dont you write the text below the image or somewhere else? then just use a mouse over event to change the display of the text, from none to inline or block.
<img src="image.gif" onMouseOver="display();" id="pic">
<span id="description" style="display: none;">text</span>

<script type="text/javascript">
function display(){document.getElementById("description").style.display="inline";}
</script>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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