简体   繁体   English

放在<a>父元素的底部</a> <p>

[英]Put <a> at bottom of parent element <p>

I believe this is a simple fix but so far I can't find it. 我相信这是一个简单的解决方法,但到目前为止我找不到。

(Consider the screenshots below) (考虑以下屏幕截图)

I have a <a class="addcomment"> within a <p> and I simply want the <a> to always be on the bottom left of the <p> , no matter its height. 我在<p>有一个<a class="addcomment"> ,并且我只是希望<a>始终位于<p>左下方,而不管其高度如何。

Using position: relative; left: 0px; bottom: 0px; 使用position: relative; left: 0px; bottom: 0px; position: relative; left: 0px; bottom: 0px; doesn't do the job even though I am sure that the <p> is the parent of the <a> . 即使我确定<p><a>的父级,也无法完成工作。

This is the current CSS styling for the element: 这是该元素的当前CSS样式:

a.addcomment:link,
a.addcomment:visited {
  text-decoration: none;
  border-bottom: 1px dotted #820106;
  color: #820106;
}

a.addcomment:hover,
a.addcomment:active {
  text-decoration: none;
  border-bottom: none;
  color: #820106;
}

this looks good because the a tag is at the bottom anyways 这看起来不错,因为反正标签仍在底部

this does not because the a tag is not at the bottom where I want it 这不是因为a标签不在我想要的底部

Thank you for knowledge and suggestions in advance 预先感谢您的知识和建议

Give the position:relative to the p, and the a with position absolute; bottom:0; left:0 给定position:relative对于p,给定position absolute; bottom:0; left:0 position absolute; bottom:0; left:0

您可以为“ P”元素尝试最小高度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM