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>
Above is my code to align absolute positioned span to align in middle.
But when I load the page it was not aligned in middle.
When I change(not really a change i think) any of the css to anything and changing it back to original value through Firebug it got aligned middle. Any idea, what's going on?