Here is my HTML structure:
div{
direction: rtl;
}
span{
direction: ltr;
}
<div>
<span>امروز -2</span>
</div>
This is expected result:
As you see, -
sign should come in the beginning of the number. How can I do that?
Note: The direction of div
should be rtl
.
ٍEDIT: I generate that number like this:
$sums_value = sprintf("%+d",$sums_value);
/*
sums_value = -2 //=> -2
sums_value = 2 //=> +2
So the number has right format, but I don't know why it will be broken in the output: