Firefox在一个带有display:table-cell的项目中的绝对位置问题

Bur*_*urt 1 html css firefox

我有三个li,我试图水平排列,然后在每个li的内部放置一个跨度.

跨度在Chrome中正确定位,但远远超出了Firefox中的li的边界.

http://jsfiddle.net/brendan_rice/mPnCh/1/

有人可以帮忙吗?

<div id="blank-slate-steps">
   <ul>
      <li class="first">
         <h3><em>Step 1</em>Create Something</h3>
         <p>Once you have created Something Else you can Create Final Thing</p>
         <span></span>
      </li>
      <li class="second">
         <h3><em>Step 2</em>Create Something Else</h3>
         <p>Once you have created Something Else you can Create Final Thing</p>
         <span></span>
      </li>
      <li class="third">
         <h3><em>Step 3</em>Create Final Thing</h3>
         <p>Once you have created Something Else you can Create Final Thing</p>
         <span></span>
      </li>
   </ul>
</div>?
Run Code Online (Sandbox Code Playgroud)

CSS

body{
padding-top: 300px;
}
#blank-slate-steps {
    background-color: #E8E8E8;
    bottom: 0;
    font-family: OpenSansCondensedBold,sans-serif;
    text-align: center;
    width: 100%;
}
#blank-slate-steps li {
    display: table-cell;
    max-width: 300px;
    padding: 40px;
    position: relative;
    width: 300px;
}
#blank-slate-steps h3 {
    font-size: 1.6em;
    margin-bottom: 0.6em;
}
#blank-slate-steps h3 em {
    color: #878787;
    float: left;
    font-size: 0.8em;
    font-style: normal;
    margin-bottom: 4px;
    text-transform: uppercase;
    width: 100%;
}
#blank-slate-steps li.second span {
    background: red url("../images/sprite/icons-grey-38.png") no-repeat scroll 0 -56px transparent;
    height: 37px;
    width: 36px;
}
#blank-slate-steps span {
background-color: red;
    display: block;
    height: 20px;
    left: -10px;
    position: absolute;
    top: 50px;
    width: 20px;
}
Run Code Online (Sandbox Code Playgroud)

Har*_*lor 6

使用position-relative为blank-slate-steps div.

#blank-slate-steps {
    background-color: #E8E8E8;
    bottom: 0;
    font-family: OpenSansCondensedBold,sans-serif;
    text-align: center;
    width: 100%;
    position: relative;
}
Run Code Online (Sandbox Code Playgroud)