Css 在各种屏幕中安装内容

Css 在各种屏幕中安装内容,css,html,dhtml,Css,Html,Dhtml,我有一个基于表格的html页面。我有一个ul菜单,一些图表和一些表格。我正试图设计它,使它只适合任何屏幕没有任何滚动条。我的浏览器没有按我在页面主表中尝试的高度=100%进行调整。有什么想法吗?提前感谢:)除非使用javascript,否则您将无法满足您的高度要求,或者使用frameset除非使用javascript,否则您将无法满足您的高度要求,或者使用frameset以下是我用来强制设置某些元素高度的javascript/jquery代码 function resize(){ winH =

我有一个基于表格的html页面。我有一个ul菜单,一些图表和一些表格。我正试图设计它,使它只适合任何屏幕没有任何滚动条。我的浏览器没有按我在页面主表中尝试的高度=100%进行调整。有什么想法吗?提前感谢:)

除非使用javascript,否则您将无法满足您的高度要求,或者使用frameset

除非使用javascript,否则您将无法满足您的高度要求,或者使用frameset

以下是我用来强制设置某些元素高度的javascript/jquery代码

function resize(){
winH = 460; 
if (document.body && document.body.offsetWidth) {
 winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
    document.documentElement &&
    document.documentElement.offsetWidth ) {
 winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
 winH = window.innerHeight;
}
$('#container').height(winH);
}
$(function(){
  resize();
  });
//the following code readjusts the element's height every time the browser window is altered. 
window.onresize = function() {
  resize();
  }

下面是我用来强制某些元素的高度的javascript/jquery代码

function resize(){
winH = 460; 
if (document.body && document.body.offsetWidth) {
 winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
    document.documentElement &&
    document.documentElement.offsetWidth ) {
 winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
 winH = window.innerHeight;
}
$('#container').height(winH);
}
$(function(){
  resize();
  });
//the following code readjusts the element's height every time the browser window is altered. 
window.onresize = function() {
  resize();
  }