ashkufaraz
ashkufaraz

Reputation: 5297

Number with dash and Persian text shows incorrect right to left

I has this code

 <p>
    
    
             با کدنوسازی
    
            01-01-1034-100100
    
    </p>   

But output is incorrect and shows number right to left(با کدنوسازی 01-01-1034-100100)!

I want this output (01-01-1034-100100)

please help me

Upvotes: 0

Views: 194

Answers (3)

Raj Soni
Raj Soni

Reputation: 89

add this, it will solve your problem

<span dir="ltr">01-01-1034-100100</span>

Upvotes: 2

Anthony L
Anthony L

Reputation: 2169

You can add the dir attribute to the text you want to display left to right, like this:

 <p>
    
    
             <span>با کدنوسازی</span>
    
            <span dir="ltr">01-01-1034-100100</span>
    
    </p>   

Upvotes: 1

Temani Afif
Temani Afif

Reputation: 272590

Put text at the end and the number before:

<p>

 01-01-1034-100100
    با کدنوسازی

</p>

And the change the direction if needed:

p {
 direction:rtl;
 text-align:left;
}
<p>

 01-01-1034-100100
    با کدنوسازی

</p>

Upvotes: 1

Related Questions