You will have to use JavaScript to do this, although CSS would be sufficient, but would be limited in relation to text alignment.
Use Jquey to make it easier.
The alignment will always be relative to the first element, so you can align it where you want.
See a working example: link
With the above script, simply enter new phrases that will automatically be aligned.
As the link may one day not work, I leave here the complete code:
HTML :
<div class="textos">
<p>olá <span>1</span> beijo</p>
<p>beijo olá <span>1</span></p>
<p><span>1</span> beijo olá</p>
</div>
CSS :
.textos {
display: block;
float: left;
width: auto;
height: auto;
}
.textos p {
display: block;
float:left;
position: relative;
clear: both;
}
JavaScript: (you need to include the Jquery library on your page)
var nPos;
$(document).ready(function(){
$(".textos p").each(function( index ) {
if(nPos==undefined){
nPos = $(this).find('span').position().left;
}else{
nCurrentPos = $(this).find('span').position().left;
$(this).css({'margin-left':(nPos-nCurrentPos)+'px'});
}
});
});