跨度被强制显示为块

时间:2013-11-10 19:42:01

标签: position html css

我在<span>内有一些<div>位于absolute

<div class="post">
<div class="post-main">
    <h3>Title</h3>
    <div class='post-meta'>
        <div> <!-- These 2 spans are supposed to be displayed in ONE line -->
            <span class='post-meta-key'>Field#1</span>
            <span class='post-meta-value'>5-3</span>
            </div>
        <div>...
.post {position:relative;}
.post-main {position: absolute; left:80%; top:80%;}

这应该按照我想要的方式工作,但是跨度会折叠成新的线条。为什么?什么是修复?

1 个答案:

答案 0 :(得分:0)

使用:

span {
display:inline-block;
}