We code as team a parserfor text-files in onsong or chordpro-syntax and render them to html. You can find the source at github.
It works fine, but now we want to render plain html as clean as possible. For that we want to use css. So far we found a solution you can watch at jsfiddle. For chords we use the css-solution (see jsfiddle)
<span class="chord"><span class="inner">E</span></span>
.chord {
position: absolute;
font-size: 13px;
font-weight: bold;
color: red;
}
.chord .inner {
position: relative;
top: -1em;
}
Now we have the problem that the chord at the end of the song are not correctly shown because there os no line-text between the following chords. The chord should be shown as H E Asus2.
Is it possible to solve this with CSS or need we to apply a solution in java by checking the elements in the sond to "force" some .
Do you have a solution?