How to place text based on a subset of text?

I have a title and then an index using HTML.

<h1>
    $250
    <sub>
    5%
    </sub>
</h1>

The problem is that I want to focus this heading based on $ 250, not including 5% in the div. Therefore, if I use the center, it counts the entire width, not only the width, excluding sub. I would like to avoid using absolute positioning if possible.

+3
source share
1 answer

, - , . , , position: absolute <sub>, . , vertical-align: sub, , , bottom .

http://jsfiddle.net/7jh5W/

0

All Articles