[Duplicate of Does Firefox support position: relative on table elements?]
I have an unordered list with vertical rules between the list-items:
HTML
<ul class="list-inner-border">
<li><span></span></li>
<li><span></span></li>
<li><span></span></li>
</ul>
CSS
.list-inner-border {
height: 100px;
}
.list-inner-border li {
display: table-cell;
position: relative; // not having this usually causes the misbehaviour
width: 1%;
}
.list-inner-border li + li:before {
background-color: red;
content: '';
height: 80%;
left: 0;
margin-top: 5%;
position: absolute;
top: 0;
width: 1px;
}
span {
background-color: gray;
display: block;
height:90px;
margin: 5px;
}
The above works in all browsers except Firefox, which behaves as if the container of position:absolute does not have positioning of its own (common oversight with position:absolute):
Chrome:
Firefox:
In Firefox, all the :before
s have jumped outside their container and stacked vertically along the edge of the root element.