Give span height of 100% in a li
At the time my html gives this output:
But i would like to have it like this:
So how you can see i tried to add a
span where the number has its space. I gave this span the class:
But somehow the
height:100% gives me not the desired effect! What should i do? Thanks http://jsfiddle.net/52VtD/3398/
Just float the
.spanContainer element to the left and change the display of the text element to
table. The reason this works is because floated elements are essentially taken out of the flow, while the
.spanText will fill the remaining area, functioning as desired.
It’s worth noting that
display:table isn’t supported in IE7 and lower.