Jump to content
  • 0

не работает text-align:justify


d.maria
 Share

Question

Добрый день!

Мой html создается програмно из файла Word (который по сути XML). Моя задача отобразить этот файл в html.

поэтому текст разбивается на части, которые в свою очередь заключены в <bdi>.

при этом мне нужно выставить свойство параграфа text-align:justify.

при выставлении "в лоб" ничего не получается. точнее не получается, если текст двуязычный (а в этом случае еще и двунаправленный)

вот html:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
</head>
<article>
<section>
<p style="direction:rtl; white-space:nowrap; text-align:justify;">
<span>
<bdi style="direction:rtl; ">
<span class="txt0">?? ???? ????? ?? ????</span>
<span class="txt0"> </span>
<span class="txt0">?</span>
</bdi>
<bdi style="direction:ltr; ">
<span class="txt0">-</span>
<span class="txt1">www.google.com</span>
<span class="txt0">,</span>
<span class="txt0"> </span>
</bdi>
<bdi style="direction:rtl; ">
<span class="txt0">???? ??????</span>
<span class="txt0"> </span>
<span class="txt0">?</span>
</bdi>
<bdi style="direction:ltr; ">
<span class="txt0">-DNS</span>
<span class="txt0"> </span>
</bdi>
<bdi style="direction:rtl; ">
<span class="txt0">????</span>
</bdi>
<bdi style="direction:ltr; ">
<span class="txt0">.</span>
<span class="txt0"> </span>
<span class="txt0">DNS</span>
</bdi>
</span>
<br />
<span>
<bdi style="direction:rtl; ">
<span class="txt0">??? ?????</span>
<span class="txt0"> </span>
<span class="txt0">
<u>???? ?????? ?? ?? ???? ?????? ????????</u>
</span>
<span class="txt0"> </span>
<span class="txt0">
<u>???</u>
</span>
<span class="txt0">.</span>
<span class="txt0"> </span>
<span class="txt0">????? ?? ??????</span>
</bdi>
</span>
<br />
<span>
<bdi style="direction:rtl; ">
<span class="txt0">???? ??? ????? ????? ???????? ?? ??? ?????</span>
</bdi>
<bdi style="direction:ltr; ">
<span class="txt0"> </span>
</bdi>
<bdi style="direction:rtl; ">
<span class="txt0"> </span>
<span class="txt0">??? ?????.</span>
</bdi>
</span>
<br />
</p>
</section>
</article>
<style type="text/css">.txt0{font:12pt "Arial"; }.txt1{font:bold 12pt "Arial"; }</style>
</html>

Извиняюсь, что код очень длинный. как уже говорила, его строит программа, тут ничего не сократить :(

что можете посоветовать?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy