我想在css和html中做一个菜单。我不知道我最终会使用哪种尺寸,所以我做了一个菜单,可以是任何大小的水平和垂直我想要它,但我有一个问题。由于某种原因菜单的右侧被隐藏。html和css中的菜单不能很好地工作
HTML:
<table>
<tr>
<td id="menu_top_left"></td><td id="menu_top_center"></td><td id="menu_top_right"></td>
</tr>
<tr id="menu_center">
<td colspan="2"><a href="#">Link 1</a></td>
</tr>
<tr id="menu_center">
<td colspan="2"><a href="#">Link 2</a></td>
</tr>
<tr id="menu_center">
<td colspan="2"><a href="#">Link 3</a></td>
</tr>
<tr id="menu_center">
<td colspan="2"><a href="#">Link 4</a></td>
</tr>
<tr id="menu_center">
<td colspan="2"><a href="#">Link 5</a></td>
</tr>
<tr id="menu_center">
<td colspan="2"><a href="#">Link 6</a></td>
</tr>
<tr>
<td id="menu_bot_left"></td><td id="menu_bot_center"></td><td id="menu_bot_right"></td>
</tr>
</table>
CSS:
table{
width:200px;
border-spacing:0;
}
table tr #menu_top_left{
width:20px;
height:20px;
background:url(top_left.png);
}
table tr #menu_top_center{
width:160px;
height:20px;
background:url(top_center.png) repeat-x;
}
table tr #menu_top_right{
width:20px;
height:20px;
background:url(top_right.png) repeat-x;
}
table #menu_center{
background:url(center_center.png) repeat;
text-align:center;
}
table tr #menu_bot_left{
width:20px;
height:20px;
background:url(bot_left.png);
}
table tr #menu_bot_center{
width:160px;
height:20px;
background:url(bot_center.png) repeat-x;
}
table tr #menu_bot_right{
width:20px;
height:20px;
background:url(bot_right.png) repeat-x;
}
其中隐藏的应该是一样,这不是隐藏在左边的右边部分。我找不到解决这个问题的方法。
希望有人能为我解决它,谢谢。 对不起,我的英语不好..
你真的应该提供一些代码镜头的更详细的信息,而不是“去我的代码,并为我修复”。 – Agat