Under Navigation, say I added a picture, like "TeenageSound" and when you click it, I want it to drop down, with many links.
How would you do this?
Printable View
Under Navigation, say I added a picture, like "TeenageSound" and when you click it, I want it to drop down, with many links.
How would you do this?
i dont get what ur askin? are u asking u want to now the Html for that or what?
If I understood you then you have to use flash,javascript or whatever because HTMl can't do it ;o
Oh, alright Charlie.
Thanks.
If you mean like the dropdown menu on my blog (bottom of the page)
Then use this code:
Code:<form name="links" action="">
<select name="menu" onchange="location=document.links.menu.options[document.links.menu.selectedIndex].value;">
<optgroup label="links">
<option value='http://link1.com'>link1</option>
<option value='http://link2.com'>link2</option>
</optgroup>
</select>
</form>
This should be done using CSS or JavaScript, unless you want what Pieman says.
i hope i may post this link but i think he wants something like this:
click
click on 1 of the menu's and you will get a demo and the script
Something like that =)Code:<script type="text/javascript">
<!--
var MenuOpen = 0;
function doMenu()
{
ID = document.getElementById("hide");
if (MenuOpen == 0)
{
ID.style.display = 'block';
MenuOpen = 1;
}
else if (MenuOpen == 1)
{
ID.style.display = 'none';
MenuOpen = 0;
}
}
-->
</script>
<button onClick="doMenu();">Open</button>
<div id="hide" style="display: none;">
<a href="">Link</a><br />
<a href="">Link</a><br />
<a href="">Link</a><br />
</div>
Making multiple functions for Sub-Menus etc.
E.X: http://floris-web.net78.net/test.php
You can create it in HTML, but it's not as effective.
I prefer using Javascript or CSS++
Use EliteGM's javascript code, it's not as confusing as CSS++, in my opinion.
But how do you use a button with Piemans' method..? It's just an 'onChange' select box..
[admin]
I just trashed 7 offtopic posts. Next one will earn a ban. Feel free to PM me if you disagree.
[/admin]
EliteGM and Pieman's solution both solve a different problem. EliteGM shows a way to expand a menu, Pieman shows a way to go directly to a page after selecting an item in a menu. From reading Mike's startpost I guess he wanted his menu to expand, which is quite easily done using EliteGM's example or an elaboration thereof. There are also many scripts available that do just that.
Anyone who thinks JS shouldn't be used for this should reconsider his position - almost the entire web relies on JS. Google.com and Yahoo.com for example, as does RageZone (quite heavily too, using a lot of AJAX). The company I work for as a developer just released a several hundred thousand dollar website using loads of JS as per the specific instructions from the client.