Home > Software engineering >  Tailwind problem with non-English characters when using tags right after eachother
Tailwind problem with non-English characters when using tags right after eachother

Time:05-03

I am facing an issue when using tags right after eachother(ex: span, 'a' and 'p'). characters merge with each other and I couldn't handle it with margin or padding.

How can I prevent that from happing?

    <a href="" >حریم شخصی</a>
    <a href="">استفاده</a>

    <span>حریم</span>
    <span>استفاده</span>
    <span>حریم</span>

Codepen: enter image description here

enter image description here

CodePudding user response:

The solution is to use &nbsp; because every character in between tags, will prevent the issue from happening.

    <span>قوانین و شرایط استفاده</span>
    &nbsp;
    <span>حریم شخصی</span>

result:

enter image description here

CodePudding user response:

Is this the way you want?

Using flex

<script src="https://cdn.tailwindcss.com"></script>
<div >
  <span><a href="#">
    قوانین و شرایط استفاده
    </a></span>
    <span><a href="#">حریم شخصی</a>
    </span>
</div>

Using margin

<script src="https://cdn.tailwindcss.com"></script>
<div >
  <span><a href="#" >
    قوانین و شرایط استفاده
    </a></span>
    <span><a href="#">حریم شخصی</a>
    </span>
</div>

  • Related