我正在尝试设计一个网页,我希望桌子高度为90%,但是当我设置一个带有overflow-y设置为滚动的div时,它会变得更大,并且会使桌子太高。请帮忙吗?
.header {
background-color:#CCCCDD;
}
table {
background-color:#EEEEEE;
border-style:solid;
border-width:5px;
border-color:#333333;
}
body {
background-image:url(BG.jpg);
background-attachment:fixed;
font-family: calibri;
z-index: -1;
}
#main {
margin-left:auto;
margin-right:auto;
position: relative;
background-color: #666;
top: 25px;
-moz-box-shadow: 0 0 10px 10px #EEE;
-webkit-box-shadow: 0 0 10px 10px #EEE;
box-shadow: 0 0 10px 10px #EEE;
width: 800px;
height: 90%;
}
#commandDiv {
overflow-y: scroll;
display: block;
border-style: solid;
border-width: 2px;
border-color: #2c2c2c;
background-color: #8F8F8F;
}
.command {
font-size: 28px;
text-align: center;
margin: 2px;
padding: 0px;
margin-top: 8px;
}
.commandDesc {
text-align: center;
font-size: 20px;
margin: 0px;
padding: 0px;
}
#imageDiv {
border-style: solid;
border-color: #333;
margin: 2px;
padding: 2px;
background-color: #8F8F8F;
}
#commandTR {
height: 100%;
}
#siteDesc {
margin: 12px;
}
#secondaryTitle {
font-size: 40px;
}
p {
font-size: 18px;
}
#origin {
padding-top: 50px;
vertical-align: bottom;
}
#tournaments {
font-size: 20px;
}