在线等待:怎样用DIV+CSS实现页面排版?(谢谢,焦急中)
现在有一段简单的HTML代码:
<html>
<head>
<style type= "text/css " media= "screen ">
div.f1oat {
float: left;
}
</style>
</head>
<body>
<div class= "float "> <a href= "# "> AAAA </a> </div>
<div class= "float "> <a href= "# "> BBBB </a> </div>
<div class= "float "> <a href= "# "> CCCC </a> </div>
<div class= "float "> <a href= "# "> DDDD </a> </div>
<div class= "float "> <a href= "# "> EEEE </a> </div>
<div class= "float "> <a href= "# "> FFFF </a> </div>
</body>
</html>
这段代码的显示结果是AAAA-FFFF在网页上左对齐显示成一排,现在我想让DDDD-FFFF显示在AAAA-CCCC的右边,并且和AAAA-CCCC之间留有部分间隔,最终的显示效果如下:
AAAA DDDD
BBBB EEEE
CCCC FFFF
请问高手CSS该如何写呢? 谢谢!!!
我对CSS几乎不懂!!!
------解决方案--------------------1.请注意,这里您把float写成了f1oat(英文字母l 写成了 阿拉伯数字 1)
div.f1oat {
float: left;
}
所以定义的式样并没有起到作用
2.请把错误纠正过来,格一个使用一次您定义的样式就可以了
<html>
<head>
<style type= "text/css " media= "screen ">
div.float {
float: left;
}
</style>
</head>
<body>
<div class= "float "> <a href= "# "> AAAA </a> </div>
<div class= " "> <a href= "# "> BBBB </a> </div>
<div class= "float "> <a href= "# "> CCCC </a> </div>
<div class= " "> <a href= "# "> DDDD </a> </div>
<div class= "float "> <a href= "# "> EEEE </a> </div>
<div class= " "> <a href= "# "> FFFF </a> </div>
</body>
</html>