Forum How do I...?

underlining

fred
This may be a silly question but I have searched and cannot find the answer to my seemingly small problem.

I want to make an underlined block with no text in it. Like so;
<u>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</u>


However, the underline will only show up if you put some text between the U tags.

Same goes for this;
<span style="text-decoration: underline;">&nbsp; &nbsp; &nbsp; &nbsp;</span>


I am hoping the solution is so simple I am going to feel stupid for even asking.

Thanks
mikeday
That's odd, non-breaking space characters should be underlined, so this looks like a bug in Prince. There is one workaround I can see, which is to fill the span with invisible text:
<u><span style="visibility: hidden">aaaaaa</span></u>

Sadly this does not produce a visible underline in Firefox, so it's not a very portable trick. We'll try and fix the bug in the next release of Prince.
fred
Thank you for the workaround. It will work for what I am doing because the HTML is never displayed in the browser, just sent to Prince.

Another solution that we found is;

.ln { background:url('/img/black-dot.gif') repeat-x left 95%; display: inline-block; overflow: hidden; min-width: 50px; max-width: 600px; height: 1.3em;}


This works but, it makes it so the text will never wrap to the next line. Not the best solution.

Thank you for the quick post and the commitment to fixing the problem. Other than this one small issue Prince rocks!!
mikeday
Today we have released Prince 6.0 rev 8, which fixes the bug affecting text-decoration on spans containing only non-breaking space characters. Thanks for letting us know about the issue. :)