如题:有<DIV>两个,怎样让它们水平排列,左边的为固定宽度,右边为自适应浏览器的宽度。
解决方案 »
- 谁能帮忙改一下这段JS程序以兼容火狐浏览器
- alert 关闭问题
- 判断是否为空,空格~~~
- Cookie 在浏览器中可以保留多长时间? 有什么办法可以让数据保留在浏览器当中呢?比如当网络不通的时候让数据先保留在浏览器中,当网络通了
- 16进制形式的字符串,如\u0063\u0073\u0064\u006E,从文本框输入,怎样转为普通字符串,如csdn?
- 请教:请问在 javaScript 中实数怎样保留如3位小数显示?
- 问个OOP的问题
- 如何判断一页已经输入到打印机?或者如何判断一页已经打印完毕?
- 急急!!!!!取浏览器高度问题??
- 进来者每人壹分!
- {goods: $.toJSON(goods)},
- 可以输入 有可以下拉的选择的怎么做啊
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<div style="width:50px; height:50px; background-color:blue; float:inline-block"></div>
<div style="width:100%; height:150px; background-color:red; display:inline-block"></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<div style="width:50px; height:50px; background-color:blue; float:inline-block"></div>
<div style="width:100%; height:150px; background-color:red; display:inline-block"></div>
</body>
</html>
<div style="width:50px; height:50px; position:absolute;top:0px;left:0px;"></div>
<div style="width:100%; height:150px; position:absolute;top:0px;left:50px;"></div>
<!DOCTYPE HTML>
<html lang="">
<head>
<meta charset="gbk">
<title></title>
</head>
<body>
<style type="text/css">
html{ height:100% }
body{ margin:0; height:100% }
#left{ width:150px; height:100%; float:left; _margin-right:-3px; background-color: yellow }
#main{ height:100%; background-color: green }
</style> <div id="left">2222222</div>
<div id="main">3333333333333</div>
</body>
</html>参考下最好还是table来做。
<html>
<head>
<title>div自适应宽度</title>
<style type="text/css">
.leftDiv
{
width: 80px;
float: left;
border: 1px solid black;
}
.rightDiv
{
border: 1px solid red;
}
</style>
</head>
<body>
<div class="leftDiv">
</div>
<div class="rightDiv">
</div>
</body>
</html>