我创建了一个 buddypress 主题,但是当我需要显示在线用户时,我的 css 不会将我的图像浮动到左侧。我已经设置了图像大小、填充和边距,它工作它只是无法浮动我的图像
<div class="item-title-members"> <a href="http://demo.com/user1">ovolo</a>
</div>
</div>
<div class="item-avatar"> <a href="http://demo.com/user2" title="admin"><img src="http://imageshack.us/a/img89/3994/e6n6.png" class="avatar user-1-avatar avatar- photo" width="150" height="150" alt="Profile picture of admin" /></a>
<div class="item-title-members"> <a href="http://demo.com/user2">admin</a>
</div>
</div>
这是CSS
div.avatar-block {
height: 200px;
width: 94%;
}
div.avatar-block .item-avatar {
position: absolute;
float: left;
}
div.item-avatar a {
height: 200px;
width: 200px;
}
.item-title-members {
text-align: center;
}