Sunday, November 21, 2010

How to make table appear on a text rollover?

I need HTML help



I want it to make it so that when someone puts their mouse over text, a table appears under it.



Help?How to make table appear on a text rollover?
One possible option:





%26lt;p%26gt;%26lt;a onmouseover = ';document.getElementById( 'myDiv' ).style.display = 'block';';%26gt; YOUR TEXT %26lt;/a%26gt;%26lt;/p%26gt;



%26lt;div id = ';myDiv'; style = ';display:none';%26gt;

YOUR TABLE HERE

%26lt;/div%26gt;



%26lt;p%26gt;YOUR PAGE CONTINUES HERE%26lt;/p%26gt;





With this code, every time you go over YOUR TEST it will show your table. The table will remain in that position all the time, if you want it to disappear you just need to add this small code:



onmouseout = ';document.getElementById( 'myDiv' ).style.display= 'none';';



to the ';a'; tag (if you want the table to disappear when you roll out the text) or to the ';div'; tag (if you want the table to disappear when you roll out of the table).



And another good thing of this code is that it's XHTML Strict valid and the JavaScript used is standard too.



If you have problems with this code, contact me, I'll be glad to help you.





PS: Sorry about the funny spacing, but if I don't do it that way, Yahoo! reduces the answer and you wouldn't be able to read it correctly.How to make table appear on a text rollover?
it's very tricky to get working, but here's how to do it



http://views-under-construction.blogspot鈥?/a>

No comments:

Post a Comment