我有一个图像我试图显示在底部边框的顶部,但它被安排在底部边框元素的后面(在本例中,名为“divider”),我无法让它正确对齐。
我希望图像显示在边框元素的中间和顶部。垂直地,我试图让图像左侧和右侧的 1px 线与 1px 边框对齐,使其看起来好像是一个元素。
这是代码:
.divider {
border-bottom: 1px solid #c3c3c3;
clear: both;
display: block;
margin-bottom: 20px;
padding-top: 20px;
width: 100%;
}
.sidearrow {
background: url(http://s16.postimage.org/sbf7v9n75/sidearrow.png) 50% 14px no-repeat;
width: 100%;
height: 25px;
}
<p>Here is some content above</p>
<div class="sidearrow"></div>
<div class="divider"></div>
<p>Here is some content below</p>
和 jsfiddle:http: //jsfiddle.net/F5xjx/2/
任何想法如何让它发挥作用?提前致谢。