为什么绿色的框不能够达到100%,就是要和外层的红色的框一样长,红色的框使用了最大宽度。<html>
<head>
<style>
DIV.outLine
{
min-width: 240px;
max-width: 100%;
margin: 0px;
width: 240px;
max-height: 320px;
position: absolute;
border-collapse: collapse;
border: solid 1px red;
clear: both;
}
.header
{
height: 18pt;
float: left;
width: 100%;
border: solid 1px green;
}
</style>
</head>
<body>
<div class="outLine">
<div class="header">
Wayland
</div>
<div id="breadcrumbDiv">
<div class="bc">
dddddddddddddddddddddddddddddddddddddddddddddd
</div>
</div>
</body>
</html>
<head>
<style>
DIV.outLine
{
min-width: 240px;
max-width: 100%;
margin: 0px;
width: 240px;
max-height: 320px;
position: absolute;
border-collapse: collapse;
border: solid 1px red;
clear: both;
}
.header
{
height: 18pt;
float: left;
width: 100%;
border: solid 1px green;
}
</style>
</head>
<body>
<div class="outLine">
<div class="header">
Wayland
</div>
<div id="breadcrumbDiv">
<div class="bc">
dddddddddddddddddddddddddddddddddddddddddddddd
</div>
</div>
</body>
</html>
解决方案 »
- 新人扫盲贴,关于委托
- 简单的用户验证控件问题
- 怎么用c#加asp.net些购物车啊?
- 在document.body.innerHTML中 加入<input id=\"Button1\" type=\"button\" value=\"在线\" onclick=\"alert(\"aa\");\" />,点击时为何提示缺少对象?
- 各位请教一下,为什么我的GridView用它自带的编辑模板上传到服务器上后就变成英文的Edit了呢??
- 怎么样提高自己的代码质量啊?
- 没有见过的,不可能出现的.NET错误!
- 关于文件下载:怎样往浏览器发送一个文件?
- 使用dll时的问题???
- 这行这句话时<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>报
- jq问题 谁知道啊 说说呗 给分
- 点击Button1上传图片 怎么使页面上的input值不变
<head>
<style>
DIV.outLine
{
min-width: 240px;
max-width: 100%;
margin: 0px;
width: 240px;
max-height: 320px;
position: absolute;
border-collapse: collapse;
border: solid 1px red;
clear: both;
float: left;
}
.header
{
height: 100%;
float: left;
width: 50%;
border: solid 1px green;
float: left;
}
</style>
</head>
<body>
<div class="outLine">
<div class="header">
Wayland
</div>
<div id="breadcrumbDiv" style="float: right;width:50px;overflow:hidden;">
<div class="bc">
dddddddddddddddddddddddddddddddddddddddddddddd
</div>
</div>
</div>
</body>
</html>
<head>
<style>
DIV.outLine
{
min-width: 240px;
max-width: 100%;
margin: 0px;
width: 240px;
max-height: 320px;
position: absolute;
border-collapse: collapse;
border: solid 1px red;
clear: both;
}
.header
{
height: 18pt;
width: 100%;
border: solid 1px green;
}
</style>
<script type="text/javascript">
function adjustW() {
var h = document.getElementById("header");
var w = document.getElementById("breadcrumbDiv");debugger;
h.style.width = w.offsetWidth;
}
</script>
</head>
<body onload="adjustW()">
<div class="outLine">
<div class="header" id="header">
Wayland
</div>
<div id="breadcrumbDiv">
<div class="bc">
dddddddddddddddddddddddddddddddddddddddddddddd
</div>
</div>
</div>
</body>
</html>