サブメニュー項目を選択するためのマウスオーバードロップダウンを持つメニューを作成しようとしています。現在、共通メニューは機能していますが、サブメニューを適切なカテゴリの下に表示する最善の方法がわかりません。
メニューは現在、歪んだ比率でテーブルを引き伸ばしています。カテゴリのタイトル テーブルに影響を与えずに、現在のテーブルのサイズを維持し、カテゴリ タイトルの下にドロップするようにします。それに表示する別のテーブルを作成する必要がありますか? 私は Web プログラミングに詳しくありません。
私の 2 番目の問題は、おそらく非常に簡単な問題です。私は答えが何であるか分かりません。Google で運を試してみましたが、うまくいきませんでした。メニューを表示し続けるには、「onMouseOut」表示を何に設定する必要がありますか。サブリンクの 1 つをクリックしようとすると、現在サブメニューが消えます。
<td>
<STYLE TYPE="text/css">
#menu1 { display : none }
#menu2 { display : none }
#menu3 { display : none }
A:link {color:blue; text-decoration:none}
A:hover {color:blue; text-decoration:underline}
</STYLE>
<div id="menu">
<table border="0" cellspacing="0" cellpadding="2" align="center">
<tbody>
<tr>
<td style="cursor: pointer; background-color: rgb(204, 238, 255); " onmouseover="this.style.backgroundColor='#E5F6FF';" onmouseout="this.style.backgroundColor='#CCEEFF'" valign="top" align="top-center" onclick="window.location.href='index2.php?page=files'"> <a href="index2.php?page=files">Files</a></td>
<td style="cursor: pointer; background-color: rgb(204, 238, 255); " onmouseover="this.style.backgroundColor='#E5F6FF';" onmouseout="this.style.backgroundColor='#CCEEFF'" valign="top" align="center">
<SPAN onMouseOver="document.all.menu2.style.display = 'block'"onMouseOut="document.all.menu2.style.display = 'none'">
Configuration<BR>
</SPAN>
<SPAN ID="menu2" onClick="document.all.menu1.style.display = 'none'">
<a href="index2.php?page=SysConfig">System Configuration</a><BR>
<a href="index2.php?page=FileConfig">File Configuration</a><BR>
<a href="index2.php?page=NetworkConfig">Network Configuration</a><BR>
</SPAN>
<td style="cursor: pointer; background-color: rgb(204, 238, 255); " onmouseover="this.style.backgroundColor='#E5F6FF';" onmouseout="this.style.backgroundColor='#CCEEFF'" valign="top" align="center" onclick="window.location.href='index2.php?page=Maintenance'"> <a href="index2.php?page=Maintenance">Maintenance Mode</a></td>
<td style="cursor: pointer; background-color: rgb(204, 238, 255); " onmouseover="this.style.backgroundColor='#E5F6FF';" onmouseout="this.style.backgroundColor='#CCEEFF'" valign="top" align="center" onclick="window.location.href='index2.php?page=IETM'"> <a href="index2.php?page=IETM">IETM</a></td>
<td style="cursor: pointer; background-color: rgb(204, 238, 255); " onmouseover="this.style.backgroundColor='#E5F6FF';"onmouseout="this.style.backgroundColor='#CCEEFF'" valign="top" align="center">
<SPAN onMouseOver="document.all.menu3.style.display = 'block'"onMouseOut="document.all.menu3.style.display = 'none'">
Power Options<BR>
</SPAN>
<SPAN ID="menu3" onClick="document.all.menu1.style.display = 'none'">
<A href="index2.php?page=Shutdown">Shutdown</A><BR>
<A href="index2.php?page=Reboot">Reboot</A><BR>
</SPAN>
</td>
</td>
</tr>
</tbody>
</table>
</div>
</TABLE>