【发布时间】:2014-07-04 10:13:49
【问题描述】:
我正在尝试对齐该容器右下角的灰色日期。 它应该漂浮在容器的底部而不是文本的末尾。 我为它制作了一个 CodePen:http://codepen.io/adrianTNT/pen/IciCH
有什么想法吗? 我可能可以用乱七八糟的代码做到这一点,但我确信必须有一种干净的方法来用正确的 CSS 代码做到这一点。
body{
background-color:#0e91a1;
padding:10px;
}
.comment{
padding:10px;
margin:0px;
margin-bottom:10px;
background-color:#FFF;
border-radius:4px;
box-shadow: 1px 1px 1px #555;
min-height:50px;
}
.comment_text{
font-family:monospace, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New";
}
.comment_date{
font-family:monospace, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New";
color:#CCC;
display:inline-block;
float:right;
}
img.comment_avatar{
border-radius:4px;
position:relative;
display:inline;
margin-right:10px;
margin-bottom:5px;
}
.comment_name{
font-weight:bold;
}
【问题讨论】:
标签: html css alignment vertical-alignment