CSS:
.list-a .desc-fix {
width: 180px;
margin: 0px auto;
position: relative;
}
.list-a .desc {
background: url("../images/trans_black.png") repeat;
display: block;
font-family: arial;
font-size: small;
height: 18px;
margin: 3px 0 0 50px;
overflow: hidden;
padding: 10px;
position: absolute;
width: 180px;
z-index: 3;
right:30px;
left:30px
}
HTML:
<span class="desc-fix">
<span class="desc">
<h4>Text A</h4>
<h5>Text B</h5>
Long text long text long text Long text long text long text Long text long text long text Long text long text long text Long text long text long textLong text long text long text Long text long text long text
</span>
</span>
The above code is used to center an absolutely positioned span.
However, when the page loads it does not appear centered as intended.
Strange behavior is observed where editing and then reverting back the CSS in Firebug results in the element being centered. Any insights into this issue?