为什么添加文档类型会破坏此布局?我怎样才能做得更好?
JSFIDDLE LINK:http://jsfiddle.net/3gA7u/1/
HTML
<body>
<div id="maincontainer">
<div id="leftcolumn">left</div>
<div id="contentwrapper">right</div>
</div>
</body>
CSS
body {
margin: 0 auto;
height: 100%;
}
#maincontainer {
width:100%;
height: 100%;
}
#leftcolumn {
float:left;
display:inline-block;
width: 510px;
height: 100%;
background: orange;
}
#contentwrapper {
position: fixed;
float:left;
display:inline-block;
width: -moz-calc(100% - 510px);
width: -webkit-calc(100% - 510px);
width: calc(100% - 510px);
height: 100%;
background-color: red;
}
JSFIDDLE LINK:http://jsfiddle.net/3gA7u/1/