我想创建一个强大的CSS样式,几乎适用于所有浏览器(包括IE7,firefox 3) 这向我展示了两个列和一个页脚。 我试图实现以下代码, 但我有一个问题:A和B不在同一水平。 请停下来修复css样式。
Click here for the current example
HTML
<div class="container">
<div class="left">A</div>
<div class="right">B</div>
<div class="footer">C</div>
</div>
CSS
div.container {
background: none repeat scroll 0 0 #9999CC;
margin: 0 auto;
width: 750px;
}
.left{
background: none repeat scroll 0 0 #99CC99;
float: left;
width: 50%;
}
.right {
background: none repeat scroll 0 0 #9999CC;
float: right;
width: 50%;
}
.footer {
background: none repeat scroll 0 0 #CCCC99;
clear: both;
}
答案 0 :(得分:3)
你错过了class
中的s。
答案 1 :(得分:1)
将<div clas="left">
更改为<div class="left">
。
:)