Howdy folks,
I am a newbie to this board so please forgive any broaches in ediquette.
I have just started working with basic java scripting for my website. I am experimenting with drop down menus. So far I've been doing ok, but I can't seem to get the sub-menus to indent. I have posted the script below. Can anyone tell me how to indent 'option 1' and 'option 2' (see script below)?? I have tried everything from placing a text-indent:10px in the span, to indenting in the font settings. HELP???
<html>
<head>
<title>Drop Down Menu</title>
<script language="javascript">
var Open = ""
var Closed = ""
function showhide(what){if (what.style.display=='none'){what.style.display='';}else{what.style.display='none'}}
</script>
</head>
<body>
<span id="menu1" onClick="showhide(menu1outline)" style="cursor:hand; text-decoration:none"><font size="1" face="Verdana" color="#0000FF">Test Menu</font></span><br>
<span id="menu1outline" style="display:'none'; cursor:hand">
<a href="http://option1" target="_blank" style="cursor:hand; text-decoration:none"><font size="1" indent="10px" face="Verdana" color="#0000FF">Option 1</font></a><br>
<a href="http://option2" target="_blank" style="cursor:hand; text-decoration:none"><font size="1" face="Verdana" color="#0000FF">Option 2</font></a><br>
</span>
</body>
</html>
I am a newbie to this board so please forgive any broaches in ediquette.
I have just started working with basic java scripting for my website. I am experimenting with drop down menus. So far I've been doing ok, but I can't seem to get the sub-menus to indent. I have posted the script below. Can anyone tell me how to indent 'option 1' and 'option 2' (see script below)?? I have tried everything from placing a text-indent:10px in the span, to indenting in the font settings. HELP???
<html>
<head>
<title>Drop Down Menu</title>
<script language="javascript">
var Open = ""
var Closed = ""
function showhide(what){if (what.style.display=='none'){what.style.display='';}else{what.style.display='none'}}
</script>
</head>
<body>
<span id="menu1" onClick="showhide(menu1outline)" style="cursor:hand; text-decoration:none"><font size="1" face="Verdana" color="#0000FF">Test Menu</font></span><br>
<span id="menu1outline" style="display:'none'; cursor:hand">
<a href="http://option1" target="_blank" style="cursor:hand; text-decoration:none"><font size="1" indent="10px" face="Verdana" color="#0000FF">Option 1</font></a><br>
<a href="http://option2" target="_blank" style="cursor:hand; text-decoration:none"><font size="1" face="Verdana" color="#0000FF">Option 2</font></a><br>
</span>
</body>
</html>
Comment