Forum How do I...?

How to eliminate whitespace between tags or prevent lines from breaking?

luizbgomide
I have a document that has something like that:
<div class="item" underline="yes" value="1">
<span class="name" >Something</span>
</div>
<div class="item" value="2">
<span class="name" >Something else</span>
</div>

And a CSS like:
.item {display: inline; }
.item[underline]>.name { text-decoration: underline; }
.item::after { content: "\00a0" attr(score)"; "; }

Expected output (_underline text_, # is unbreakable space):
_Something_#1; Something else#2;

I'm getting:
_Something_ 1; Something else 2;

Which line breaks before the number if it happens to be at the end of the line. I can't move the ::after to the .name element because then it would also be underlined. How can I prevent the lines from breaking or ignore the whitespace (via Prince) the is making the lines break?

Edited by luizbgomide

mikeday
How about applying "white-space: nowrap"
luizbgomide
Only the white-space between tags is causing problems because of the number semi colon, the rest should wrap normally.
Also some of the items have no value attribute and get just a "; " added to the end of it. The white-space between tags adds an undesirable space to it.
An alternative for me would be able to set text-decoration to the element but to the ::before and ::after contents.
luizbgomide
I know there must be a reason, but I don't understand why text-decoration is applied the whole element (including pseudo elements) and don't properties are applied just to the pseudo element.
mikeday
Perhaps you could send me (mikeday@yeslogic.com) the document and I will take a look.