【发布时间】:2021-11-23 03:35:47
【问题描述】:
**如何在右上角放置一个按钮,左边是空白? **
<div class="newsletter">
<button class="goup">GO UP</button> *How can I put this btn to the right with full white space??*
<div class="left-side">
<a href="">Shop</a>
<a href="">About</a>
<a href="">Support</a>
<a href="">COVID-19 Info</a>
<a href="">Order Status</a>
<a href="">Corporate Sales</a>
</div>
//CSS
.newsletter {
position: relative;
overflow: hidden;
background-color: #f9f9f9;
}
.goup {
width: 81px;
height: 81px;
border: none;
padding: 25px 30px;
font-size: 16px;
font-weight: 700;
background-color: #000;
color: #fff;
display: flex;
float: right;
justify-content: right;
}
.left-side {
position: relative;
}
我怎样才能把这个 btn 放在右边的空白处??
【问题讨论】:
-
您可以发送按钮现在正在做什么的屏幕截图吗?只是为了让我看看有什么问题。
-
我刚刚克隆了 Grovemade 网站 (grovemade.com)。该按钮位于页脚部分之前。
标签: html css button css-float css-position