基本上,我正在尝试将填充添加到配置文件图像并将其对齐,如下所示在我的引导页面中。
以下是它目前的样子:
这就是我希望它的外观:
(请注意,用户名在个人资料图片的顶部,评论文本在下方,但与个人资料图片并排)
这是 HTML:(我是 Bootstrap 的新手)
<div class="row">
<div class="col-md-12">
<img src="~/Images/avatar.png" class="profile-picture" />
<label>Username - 1 month ago</label>
<p>
This is the text of the comment. This is the text of the comment. This is the text of the comment. This is the text of the comment. This is the text of the comment. This is the text of the comment. This is the text of the comment. This is the text of the comment.
</p>
</div>
</div>
这是我的 CSS,它为个人资料图片添加了一些填充:
.profile-picture
{
padding-left: 10px;
padding-right: 10px;
}