View Single Post
Old 01-08-2004, 23:42   #2
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: Javascript Text/Image manipulation

Quote:
Originally Posted by Tricky
Help!? - I am currently redeveloping one of my websites and have started to attack! the menus...

I want to have a image (the button) which I am displaying on screen within a table:
<td width="10%"><a href="loadpage.htm" OnMouseOver="ypSlideOutMenu.showMenu('menu1');hide me();" OnMouseOut="ypSlideOutMenu.hideMenu('menu1');showm e();"><img src="http://mysite.com/images/stdbutton.gif" alt="Menu1" /></a></td>

The button is a plain graphic I.e. {______}
What I want to do is overlay some text on top of the image I.e. {_MENU_}

Therefore I can have one image to reuse on my sites without defining one for each menu option.

You can define layered panels in HTML, like this:

Code:
<div id="Menu1" style="position:absolute; width:75px; height:20px; z-index:1; left: 50; top: 100px; Some Menu Text</div>
The z-index is greater than 0 so should appear above the image. The position absolute means it is positioned properly. You should have a div with you image as well so you have full control over that as well.

HTH
punky is offline   Reply With Quote