我想在我正在制作的这个网页的底部有两列,但它们是彼此叠加而不是彼此相邻。我做错了什么?
这是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;
}
答案 0 :(得分:2)
请勿使用数字开始您的ID名称,请使用left-column
和right-column
或one-left-column
和one-right-column
代替