<div class="Page-Center-99">
<div class="div_top_left"></div>
<div class="div_top_center"></div>
<div class="div_top_right"></div>
</div>
问题是在CSS中width:后面不能用 * 表示.如果不写width:70%;的话,图像填充宽又没有拉坤和填充..div_top_left
{
float:left;
clear:right;
width:120px;
height:27px;
background:url(http://localhost/AspNetForums/Images/Common/div_top_left.gif) no-repeat;
}
.div_top_center
{
float:left;
clear:right;
width:70%;
height:27px;
background:url(http://localhost/AspNetForums/Images/Common/div_top_center.gif);
}
.div_top_right
{
float:left;
clear:right;
width:120px;
height:27px;
background:url(http://localhost/AspNetForums/Images/Common/div_top_right.gif) no-repeat;
}
<div class="div_top_left"></div>
<div class="div_top_center"></div>
<div class="div_top_right"></div>
</div>
问题是在CSS中width:后面不能用 * 表示.如果不写width:70%;的话,图像填充宽又没有拉坤和填充..div_top_left
{
float:left;
clear:right;
width:120px;
height:27px;
background:url(http://localhost/AspNetForums/Images/Common/div_top_left.gif) no-repeat;
}
.div_top_center
{
float:left;
clear:right;
width:70%;
height:27px;
background:url(http://localhost/AspNetForums/Images/Common/div_top_center.gif);
}
.div_top_right
{
float:left;
clear:right;
width:120px;
height:27px;
background:url(http://localhost/AspNetForums/Images/Common/div_top_right.gif) no-repeat;
}
解决方案 »
- 怎样把一个.net网站放到asp网站的一个文件夹下运行?
- web service调用问题【不同语言,不同平台】
- 如何实现关闭页面自动退出清楚session
- DundasWebChart超过10列的问题,谢谢!
- Sql语句的问题
- 客户端如何缓存图片
- 异步时,怎么使用Session,和Response.Redirect,请各位大哥大姐指点
- 怎样在文件上传的时候自动创建一个文件夹
- 如何让一个asp:Button具有背景图片?不能用imagebutton.
- 这个问题可能不是很难!大家看看
- [开源]海天人.Net新闻系统(skyNews 1.1预览版)
- DataQuicker快捷数据层ORM组件 发布第一版本0.9.1
.Page-Center-99
{
padding:6px;
width:99%;
border:0;
clear:both;
vertical-align:top;
}
没有水平齐对属性,我要求该DIV center显示如何做?对了,我这是按web设计准备做的.
<tr>
<td><div id=div1 width=100></div></td>
<td><div id=div2 style="width:expression(document.getElementById('table1').offsetWidth-document.ofdocument.getElementById('div1').offsetWidth-document.getElementById('div2').offsetWidth;"</td>
<td><div id=div3 width=100></div></td>
</tr>
</table>
<div id="parentId" class="Page-Center-99">
<div id="child-left" class="div_top_left"></div>
<div class="div_top_center" style="width:expression(document.getElementById('parentId').offsetWidth-document.getElementById('child-left').offsetWidth-document.getElementById('child-right').offsetWidth);"></div>
<div id="child-right" class="div_top_right"></div>
</div>
</div>在外多加一层<DIV>了. 有好办法的人请告诉我.暂不结贴.
position: absolute;
top: 0px;
left: 0px;
margin: 20px;
padding: 10px;
border: 5px solid #666;
background: #FFF;
width: 150px; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
width: 120px;
}
html>body #left {
width: 120px; /* ie5win fudge ends */
}
#middle {
margin: 20px 190px 20px 190px;
padding: 10px;
border: 5px solid #666;
background: #FFF;
}
#right {
position: absolute;
top: 0px;
right: 0px; /* Opera5.02 will show a space
at right when there is no scroll bar */
margin: 20px;
padding: 10px;
border: 5px solid #666;
background: #FFF;
width: 150px; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
width: 120px;
}
html>body right {
width: 120px; /* ie5win fudge ends */
}
<img class="img_top_info_left"/>.img_top_info_left
{
border: 0px solid red;
src:url(http://localhost/AspNetForums/Images/Common/div_top_info_left.gif);
}
为什么图片显示不了呢?
<HTML>
<HEAD>
<TITLE>DIV布局测试</TITLE>
<style>
div
{
height:150px;
}
div.left
{
width:20%;
float:left;
clear:right;
background-color:#eeeeee;
} div.center
{
width:50%;
float:left;
clear:right;
background-color:#CCCCCC;
} div.right
{
width:30%;
float:left;
clear:right;
background-color:#808080;
}
div.both
{
width:100%;
clear:both;
background-color:#696969;
}</style>
</HEAD><BODY>
<div class="left">左侧</div>
<div class="center">中侧</div>
<div class="right">右侧</div><div class="both">全行</div> <div class="left">左侧</div>
<div class="center">中侧</div>
<div class="right">右侧</div>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>DIV布局测试</TITLE>
<style>
div
{
height:150px;
}
div.left
{
width:20%;
float:left;
clear:right;
background-color:#eeeeee;
} div.center
{
width:50%;
float:left;
clear:right;
background-color:#CCCCCC;
} div.right
{
width:30%;
float:left;
clear:right;
background-color:#808080;
}
div.both
{
width:100%;
clear:both;
background-color:#696969;
}</style>
</HEAD><BODY>
<div class="left">左侧</div>
<div class="center">中侧</div>
<div class="right">右侧</div><div class="both">全行</div> <div class="left">左侧</div>
<div class="center">中侧</div>
<div class="right">右侧</div>
</BODY>
</HTML>
在每个<div>里面加上 style="display:line" 即可。
至于宽度,你自己去指定。