为什么我的列不能正确对齐?

时间:2012-06-24 17:18:01

标签: css html5

我想在我正在制作的这个网页的底部有两列,但它们是彼此叠加而不是彼此相邻。我做错了什么?

这是html:

<!doctype html>
<html>
<head>
<meta charset=utf-8">
<title>Untitled Document</title>
</style>
<style type="text/css">
@import url("adobeIndex.css");
</style>
</head>

<body>
<div id="container">
<div id="banner">Content for  id "banner" Goes Here</div>
<div id="left-text">Content for  id "left-text" Goes Here</div>
<div id="1-left-column">Content for  id "1-left-column" Goes Here </div>
<div id="1-right-column"> Content for id "1-right-column" Goes Here</div>
</div>
</body>
</html>

CSS:

    @charset "utf-8";
/* CSS Document */

#container {
width:968px;
background: #00F;
margin:auto;
padding-left:10px;
padding-right:10px;
overflow:hidden;
 }

#left-text {
 width:300px;
 height:400px;
 margin-top:20px;
 margin-bottom:20px;
}

#1-left-column, #1-right-column {
width: 464px;
float: left;
}
#1-right-column {
margin-left: 20px;
}

1 个答案:

答案 0 :(得分:2)

请勿使用数字开始您的ID名称,请使用left-columnright-columnone-left-columnone-right-column代替

相关问题