Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 调整div大小以适合页眉和页脚_Jquery_Css_Html_Cordova - Fatal编程技术网

Jquery 调整div大小以适合页眉和页脚

Jquery 调整div大小以适合页眉和页脚,jquery,css,html,cordova,Jquery,Css,Html,Cordova,我想在所有屏幕尺寸上使我的body container div(位置:relative)适合页眉和页脚。页脚处于固定位置。主体容器应调整大小以适应页眉和页脚之间的大小 虽然css是首选,但如果在jQuery/JS中更容易实现,那么我将使用它。 请让我知道我应该在页面中做什么更改,或者如果您需要有关div的更多信息 PS:我在phonegap中使用这个页面来显示iPhone和iPad 编辑: 我想做的是一个模型代码。我希望#slider div适合#fcheader和#footer之间。 由于到J

我想在所有屏幕尺寸上使我的body container div(位置:relative)适合页眉和页脚。页脚处于固定位置。主体容器应调整大小以适应页眉和页脚之间的大小

虽然css是首选,但如果在jQuery/JS中更容易实现,那么我将使用它。
请让我知道我应该在页面中做什么更改,或者如果您需要有关div的更多信息

PS:我在phonegap中使用这个页面来显示iPhone和iPad

编辑:

我想做的是一个模型代码。我希望#slider div适合#fcheader和#footer之间。
由于到JSFIDLE的链接也需要代码,下面是代码-

HTML-

<div id="fcheader">
    <div id="headertext">Title1</div>
    <div id="headertitle">Title2</div>
</div>
<div id="bodycontent">
    <div id="slider">Body</div>
</div>
<div id="footer">
    <table width=100%>footer</table>
</div>
</div>
#slider{
    position:absolute;
    width:100%;
    height:200px;
    top:0;
    overflow-y:scroll;
    overflow-x:hidden;
    font-color:#0067b3;
    background-color:yellow;
}
#headertitle{
    clear:both;
    color:#5E99D7;
    font-size:2.1em;
    margin-left:3%;
    position:relative;

}
#fcheader{
    background-color:red;
}
#headertext{
    clear:both;
    color:#0067b3;
    font-size:2.02em;
    margin-left:3%;
    margin-top:1%;
    padding-top:0.8%;
    padding-right:5%;
    float:right;
}
#bodycontent{
    position:relative;
}
#footer{
    position:fixed;
    width:100%;
    height:70px;
    bottom:5%;
    background-color:aqua;
}

使用phonegap应该不会有任何问题,因为页面根本不会滚动。另外,主体容器是(溢出:滚动)请创建一个易于解决的小提琴。@LeoTAbraham,我确定,我在上面。您可以显示您的代码并为其提供JSFIDLE链接吗?-@Creator在这里-也添加了问题中的代码