html:
Code
<!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><title>
无标题页
</title><meta http-equiv="Content-type" content="text/html; charset=utf-8" /><meta name="keywords" /><meta name="description" /><link href="http://www.cnblogs.com/../styles/main.css" rel="stylesheet" type="text/css" /><link href="http://www.cnblogs.com/../styles/grid.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.style1
{}{
width: 60px;
}
</style>
</head>
<body>
<div class="container" style="margin-left:0">
<div class="box">
<h2>
新建新闻</h2>
</div>
</div>
<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><title>
无标题页
</title><meta http-equiv="Content-type" content="text/html; charset=utf-8" /><meta name="keywords" /><meta name="description" /><link href="http://www.cnblogs.com/../styles/main.css" rel="stylesheet" type="text/css" /><link href="http://www.cnblogs.com/../styles/grid.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.style1
{}{
width: 60px;
}
</style>
</head>
<body>
<div class="container" style="margin-left:0">
<div class="box">
<h2>
新建新闻</h2>
</div>
</div>
<div>
</body>
</html>
其实.container{margin:0 auto; 100%;}
在框架页中会出现整个容器溢出,没有自适应宽度,解决方法:
scrolling应该设置为yes
Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<frameset rows="108,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="../common/header.aspx" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frameset cols="180,*" frameborder="no" border="0" framespacing="0">
<frame src="leftmenu.aspx" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
<frame src="main.aspx" name="mainFrame" id="mainFrame" title="mainFrame" scrolling="yes" />
</frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<frameset rows="108,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="../common/header.aspx" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frameset cols="180,*" frameborder="no" border="0" framespacing="0">
<frame src="leftmenu.aspx" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
<frame src="main.aspx" name="mainFrame" id="mainFrame" title="mainFrame" scrolling="yes" />
</frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>