css - 试图让我的删除按钮坐在右侧
问题描述
我不擅长css,但我试图让我的按钮坐在“发布者”旁边。我得到了我想要的按钮,但我希望它在盒子里面。
截屏:
解决方案
好吧,也许你不知道你真正需要什么。这里我从你的截图中做一个例子,通过使用flex
对齐内容和按钮,希望这对你有帮助。
.thebottom{
background-color:#F5F5F5;
display:flex;
justify-content:space-between;
align-items:center;
padding:20px;
}
.theleft{
display:flex;
flex-direction:column;
}
.deletebtn{
background-color:#F24701;
padding:10px 25px;
color:#fff;
text-align:center;
}
<div class="thebottom">
<div class="theleft">
<div>
Post by : ABC
</div>
<div>
30th of August, 3AM
</div>
</div>
<div class="deletebtn">DELETE</div>
</div>
推荐阅读
- java - 如何使用编程配置在springboot中的ehcache3中设置maxDepthExceededBehavior?
- c++ - C++ - 有深度的字符串
- python - 使用 filter_by 不能按预期工作
- lisp - 非破坏性子序列——lisp 中的例外
- python - 列表中数据的自定义重采样
- python - 如果在使用字典或列表时语句不起作用
- amazon-web-services - 使用 lambda nodejs 更新 Route53 记录不起作用
- r - R中的特征工程
- python - Seaborn - 具有不对称轴的地图对角线
- twig - 如何在没有时区干扰的情况下在树枝中渲染时间