<form>
<div style="width:100%" >
<div id="head">
<table style="width:100%;" border="0px" cellpadding="0px" cellspacing="0" align="center">
<tr>
<td style="width:29.2%;height:91px;background: url(images/1.jpg) repeat-x;"></td>
<td style="width:40.4%;height:91px;background: url(images/2.jpg) repeat-x;"><h1>系</h1></TD>
<td style="width:20.4%;height:91px;background: url(images/4.jpg) repeat-x;"></td>
<td style="width:10%;height:91px;background: url(images/3.jpg) repeat-x;"></td>
</tr>
</table>
</div>
</div>
</form>
我的分辨率是1024*768显示没有问题,但在别人宽屏上时,右边出现很大白空隙,怎么让div随分辨率变化而变化。谢谢
<div style="width:100%" >
<div id="head">
<table style="width:100%;" border="0px" cellpadding="0px" cellspacing="0" align="center">
<tr>
<td style="width:29.2%;height:91px;background: url(images/1.jpg) repeat-x;"></td>
<td style="width:40.4%;height:91px;background: url(images/2.jpg) repeat-x;"><h1>系</h1></TD>
<td style="width:20.4%;height:91px;background: url(images/4.jpg) repeat-x;"></td>
<td style="width:10%;height:91px;background: url(images/3.jpg) repeat-x;"></td>
</tr>
</table>
</div>
</div>
</form>
我的分辨率是1024*768显示没有问题,但在别人宽屏上时,右边出现很大白空隙,怎么让div随分辨率变化而变化。谢谢
解决方案 »
- 页面跳转
- asp.net2.0生成html静态页面
- vs.net2005里的解决方案资源管理器和属性窗口都不见了
- “DataGrid_UpdateCommand”的重载均与委托“System.Web.UI.WebControls.GridViewUpdatedEventHandler”不匹配
- 急急急:Ajax和repeater控件的问题????
- 菜鸟问:GET方式和POST方式各是什么意思?有什么区别?
- 路由器的DDNS出问题了
- 怎样检测服务端FrameWork的版本?
- 谁帮我看一下这个重载有什么作用?是从PetShop中提出来的.
- 这样写带参数的SQL语句为什么不对?
- sqlserver 数据库视图更新问题???
- 关于为HtmlTable复制一行
<td style="width:auto;height:91px;background: url(images/3.jpg) repeat-x;"></td>
给出分辨率小于800和大于800设置div1的代码,其中x1,y1,x2,y2自己定义!!
function SetHeight() {
var hei = window.screen.height;
// var hei1 = document.body.clientHeight;
if (hei <= 800) {
document.getElementById("div1").style.height = x1;
document.getElementById("div1").style.height = y1;
}
else if (hei > 800) {
document.getElementById("div1").style.height = x2;
document.getElementById("div1").style.height = y2;
}
}