[英]Align the text to middle of div
Basically I am trying to align the "View Full Article (0 Comments)" text to the middle of the arrow in the dark blue div on the below linked page. 基本上,我试图将“查看完整文章(0条评论)”文本与下面链接页面上深蓝色div中箭头的中央对齐。
I have tried line height and that doesn't work. 我已经尝试过线高,但是那行不通。 Any ideas?
有任何想法吗?
It depends on how fancy you want to get, I would just use relative/absolute positioning here, so this does the trick 这取决于您想获得的幻想程度,我将在此处使用相对/绝对定位,因此可以解决问题
.articles-bottom { position: relative; }
.articles-bottom a { left: 30px; position: absolute; top: 7px; }
That should do it. 那应该做。
try applying following to your a tag: 尝试将以下内容应用于您的标签:
.articles-bottom a
{
vertical-align: middle;
line-height: 2em;
float: left;
}
and for img
inside div
和
div
img
img{
float:left;
}
hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.