将链接对齐底部和右侧

时间:2017-09-09 16:24:45

标签: html css

我试图移动绿色链接,以便它像跨度一样坐在线上。这是我的HTML

wxEVT_TREELIST_ITEM_CHECKED

这是我的CSS

<div class="adminpanel-span" id="approved-users">
  <span>Approved Users</span>
  <a href="https://google.com" style="clear:both;float:right; font-size: 18px;" target="_blank">Download List</a>
</div>

我查看了其他帖子并找到了如何将其推向右侧,但我无法找到如何将其降低到线。如何在线上定位链接?

1 个答案:

答案 0 :(得分:0)

&#13;
&#13;
.adminpanel-span {
  font-size: 36px;
  border-bottom: 1px solid #777777;
  padding-bottom: 10px;
  position: relative;
}

.adminpanel-span > a{
  position: absolute;
  bottom: 0px;
  right: 0px;
}
&#13;
<div class="adminpanel-span" id="approved-users">
  <span>Approved Users</span>
  <a href="https://google.com" style="clear:both;float:right; font-size: 18px;" target="_blank">Download List</a>
</div>
&#13;
&#13;
&#13;

尝试使用postion: absoluteposition: relative