问题是这样的,我层里面的东西是会增加的,可是在我增加内容的同时我的内容就会变长,这时候我的外面的div还是不变,我嵌套table在里面也不行,望高手帮忙看看,代码如下:<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<style type="text/css">.menubar {
BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BACKGROUND: #0099cc; BORDER-LEFT: 1px outset; WIDTH: 100px; CURSOR: default; COLOR: yellow; BORDER-BOTTOM: 1px outset; POSITION: absolute; TOP: 10px; HEIGHT: 20px
}
.menu { border-right: red 2px solid;
border-top: red 2px solid;
border-bottom: red 2px solid;
border-left: red 2px solid;
display: none;
background: yellow;
padding-bottom: 15px;
padding-top: 15px;
}
.menu A {
COLOR: blue; TEXT-DECORATION: none
}
.menu A:hover {
COLOR: #ffffff
}#LanguagePopup {
BORDER-RIGHT: #d3d3d3 1px solid; PADDING-RIGHT: 7px; BORDER-TOP: #d3d3d3 1px solid; DISPLAY: none; PADDING-LEFT: 7px; Z-INDEX: 301; BACKGROUND: url(../Images/transparent_white.png); LEFT: 0px; PADDING-BOTTOM: 12px; BORDER-LEFT: #d3d3d3 1px solid; PADDING-TOP: 12px; BORDER-BOTTOM: #d3d3d3 1px solid; POSITION: absolute; TOP: 0px; TEXT-ALIGN: left
}
.LanguagePopup UL {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
.LanguagePopup LI {
DISPLAY: block; COLOR: #595959; LIST-STYLE-TYPE: none; TEXT-DECORATION: none
}
.LanguagePopup A {
PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 24px; PADDING-BOTTOM: 6px; COLOR: #595959; PADDING-TOP: 6px; TEXT-DECORATION: none
}
</style>
<script language="javascript">
function menuControl(show)
{
window.event.cancelBubble=true; var numID=show;
var obj=eval("menu_"+numID);
if(obj.style.display=="none")
eval("showMenu("+"menu_"+numID+")");
else
eval("hideMenu("+"menu_"+numID+")");
}
var nbottom=0,speed=7;
function displayMenu(obj)
{
obj.style.clip="rect(0 100% "+nbottom+"% 0)";
nbottom+=speed;
if(nbottom<=100)
{
timerID=setTimeout("displayMenu("+obj.id+"),70");
}
else clearTimeout(timerID);
}
function showMenu(obj)
{
obj.style.display="block";
obj.style.clip="rect(0 0 0 0)";
nbottom=5;
displayMenu(obj);
}
function hideMenu(obj)
{
nbottom=0;
obj.style.display="none";
}
function keepMenu(obj)
{
obj.style.display="block";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<DIV class="menubar" id="menubar_1" onclick="menuControl(1)"
align="center" style="background-image:url('bg_btn.JPG')">教育网站 </DIV></TD>
<div class="menu" id="menu_1" onclick="keepMenu(this)" align="left" style="margin-top:190px; width:130px; height:70px">
<div style="float:left; " class="LanguagePopup">
<table><tr><td>
<ul style="list-style-type:none; line-height:180%; float:left">
<li style="width:107px;"><font style="float:left; margin-left:20px; font-size:12px;"><a>最新</a></font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">Target map</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">筛选</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">推荐</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">面试</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">offer</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">录用</font></li>
</ul></td></tr></table>
</div>
</div>
</form>
</body>
</html>
<head runat="server">
<title>无标题页</title>
<style type="text/css">.menubar {
BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BACKGROUND: #0099cc; BORDER-LEFT: 1px outset; WIDTH: 100px; CURSOR: default; COLOR: yellow; BORDER-BOTTOM: 1px outset; POSITION: absolute; TOP: 10px; HEIGHT: 20px
}
.menu { border-right: red 2px solid;
border-top: red 2px solid;
border-bottom: red 2px solid;
border-left: red 2px solid;
display: none;
background: yellow;
padding-bottom: 15px;
padding-top: 15px;
}
.menu A {
COLOR: blue; TEXT-DECORATION: none
}
.menu A:hover {
COLOR: #ffffff
}#LanguagePopup {
BORDER-RIGHT: #d3d3d3 1px solid; PADDING-RIGHT: 7px; BORDER-TOP: #d3d3d3 1px solid; DISPLAY: none; PADDING-LEFT: 7px; Z-INDEX: 301; BACKGROUND: url(../Images/transparent_white.png); LEFT: 0px; PADDING-BOTTOM: 12px; BORDER-LEFT: #d3d3d3 1px solid; PADDING-TOP: 12px; BORDER-BOTTOM: #d3d3d3 1px solid; POSITION: absolute; TOP: 0px; TEXT-ALIGN: left
}
.LanguagePopup UL {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
.LanguagePopup LI {
DISPLAY: block; COLOR: #595959; LIST-STYLE-TYPE: none; TEXT-DECORATION: none
}
.LanguagePopup A {
PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 24px; PADDING-BOTTOM: 6px; COLOR: #595959; PADDING-TOP: 6px; TEXT-DECORATION: none
}
</style>
<script language="javascript">
function menuControl(show)
{
window.event.cancelBubble=true; var numID=show;
var obj=eval("menu_"+numID);
if(obj.style.display=="none")
eval("showMenu("+"menu_"+numID+")");
else
eval("hideMenu("+"menu_"+numID+")");
}
var nbottom=0,speed=7;
function displayMenu(obj)
{
obj.style.clip="rect(0 100% "+nbottom+"% 0)";
nbottom+=speed;
if(nbottom<=100)
{
timerID=setTimeout("displayMenu("+obj.id+"),70");
}
else clearTimeout(timerID);
}
function showMenu(obj)
{
obj.style.display="block";
obj.style.clip="rect(0 0 0 0)";
nbottom=5;
displayMenu(obj);
}
function hideMenu(obj)
{
nbottom=0;
obj.style.display="none";
}
function keepMenu(obj)
{
obj.style.display="block";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<DIV class="menubar" id="menubar_1" onclick="menuControl(1)"
align="center" style="background-image:url('bg_btn.JPG')">教育网站 </DIV></TD>
<div class="menu" id="menu_1" onclick="keepMenu(this)" align="left" style="margin-top:190px; width:130px; height:70px">
<div style="float:left; " class="LanguagePopup">
<table><tr><td>
<ul style="list-style-type:none; line-height:180%; float:left">
<li style="width:107px;"><font style="float:left; margin-left:20px; font-size:12px;"><a>最新</a></font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">Target map</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">筛选</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">推荐</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">面试</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">offer</font></li>
<li style="width:107px;" onmouseover="this.style.backgroundColor='#0080C0'" onmouseout="this.style.backgroundColor=''"><font style="float:left; margin-left:20px;font-size:12px;">录用</font></li>
</ul></td></tr></table>
</div>
</div>
</form>
</body>
</html>
<li style="width: 107px;" <div class="menu" id="menu_1" onclick="keepMenu(this)" align="left" style="margin-top: 190px;
width: 130px; height: 70px">2个地方都写死了宽度啊
把height:70px"去掉!!