一直在做一个web项目,在这个项目中有两个点很难修改
第一个是关于右边滚动条的长度,以前都是固定的,不知根据内容自动扩展,今天终于发现在哪可以修改了,上代码:
style.css文件:
html, body {
height: 100%;
}
body {
background-color: #00000;
color: #00224f;
height: 100%;
margin:0px;
padding:0px;
}
/*
* GENERAL LAYOUT ITEMS
* Contains general styles for all containers, bars, buttons, etc.
* Use ID's (#) for all unique items, classes (.) for the rest.
*/
#container {
font-family: Trebuchet MS, Arial;
height: 1500px;
min-height: 1500px;
width: 100%;
min-width: 1000px;
font-size: 100%;
background: transparent;
overflow-y:hidden;
}
#leftcontent {
margin:0;/*0 5px 0 7px*/
min-width:770px;
border-left:1px solid #f0f0f0;
height:auto!important;
height:100%;
min-height:100%;
}
#content {
margin:0;/*0 5px 0 7px*/
min-width:770px;
height:auto!important;
height:100%;
min-height:100%;
}
#contentbox {
background-color:#F5FFFA;/*ffffff;*/
width:auto;
padding:1px 0 0 3px;
height:100%;
overflow-x:hidden;
/*overflow-y:auto;*/
overflow-y:hidden;
}
#mapbox {
height: 100%;
width: 100%;
margin: 0px;
padding: 0px;
background-color: #F0F8FF;/*#f9f8fd;*/
overflow-x:hidden;
/*overflow-y:auto;*/
overflow-y:hidden;
}
.mmap {
width: 100%;
height: 100%;
margin: 6px 6px 2px 6px;
border:1px solid #6f6f6f;
}
#opcontentBox {
margin-left:-300px;
position:relative;
width:300px;
height:100%;
float:left;
margin-top:1px;
overflow-x:auto;
overflow-y:auto;
}
#opcontent {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
#opcontentBox {
border: 1px solid #97a5b0;
}
#leftdivH71{
border-top:1px solid #f7f7f7;
border-bottom:1px solid #ccc;
width:300px;
height:24px;
background:#d2d8d9 url(../images/titledivbgN.gif) no-repeat;
}
#leftdivH7{
width:300px;
padding-left:70px;
/*background:#d2d8d9 url(../images/titledivbgN.gif) no-repeat;*/
background:url(../images/treetitlelogo.gif) no-repeat 55px 2px;
text-decoration:none;
font-weight:bolder;
color:#404040;
}
把下面这段代码:
#container {
font-family: Trebuchet MS, Arial;
height: 1500px;
min-height: 1500px;
width: 100%;
min-width: 1000px;
font-size: 100%;
background: transparent;
overflow-y:hidden;
}
改成下面这样就可以实现右边滚动条自动扩展:
#container {
font-family: Trebuchet MS, Arial;
min-height: 1500px;
width: 100%;
min-width: 1000px;
font-size: 100%;
background: transparent;
overflow-y:hidden;
}
第二个是关于左边为树形留的空间,有的地方不用,则要把左边空间去掉,还是修改style.css文件,把下面这段代码:
#leftcontent {
margin:0;/*0 5px 0 7px*/
min-width:770px;
border-left:300px solid #f0f0f0;
height:auto!important;
height:100%;
min-height:100%;
}
改成下面这样即可:
#leftcontent {
margin:0;/*0 5px 0 7px*/
min-width:770px;
border-left:1px solid #f0f0f0;
height:auto!important;
height:100%;
min-height:100%;
}
两个令我头疼的问题!