我使用div id标签在页面上放置图像,到目前为止,我有四个在页面顶部排成一排,但是当我将一个图像置于左上角,它只是在中间的图片下方。我使用了float:left和clear:left,但是这些都不起作用。我需要身份证“事实”在左上角的图像下,这是“轻”任何帮助?这是到目前为止我的代码 -定位图像CSS DIV ID标签
HTML
<div id="light"><img src="harrypotter/harrylightening.png"/></div>
<div id="kiss"><img src="harrypotter/ronkiss.png"/></div>
<div id="keeper"><img src="harrypotter/keeper.jpg"/></div>
<div id="photo"><img src="harrypotter/photo.jpg"/></div>
<div id="facts"><img src="harrypotter/facts.jpg"/></div>
CSS
#light > img {
float:left;
height:447;
width:326;
margin-top:10px;
margin-left:8px;
margin-right:5px;
margin-bottom:5px;
}
#kiss > img {
height:252;
width:336;
margin-top:10px;
margin-bottom:5px;
margin-right:5px;
float:left;
}
#keeper > img {
height:234;
width:333;
margin-top:10px;
margin-bottom:5px;
margin-right:5px;
float:left;
}
#photo > img {
height:301;
width:225;
margin-top:10px;
margin-bottom:5px;
float:right;
}
谢谢!我很新,因为你可以告诉... – user3185373