Thread: [html] Right-Justify Text
i built site multi-language support. i'm trying switch layout of page right-to-left languages , text have justified keep so. css doesn't have option right-justify text. know how can achieve this?
is there better way using php or javascript? think might run problems centered text.php code:
<?php
$lang = getlanguage(); // function to get the browsers' preferred language
$rtol_langs = array(1 => 'ar', 'he');
$rtol = array_search($lang, $rtol_langs);
$align = 'left';
$justify = 'justify';
if ($rtol)
{
$align = 'right';
$justify = (something to right-justify here);
}
print("<html lang=$lang>
<head>
<title>direction test</title>
<style type=text/css>
.normal {text-align: $align}
.justify {text-align: $justify}
</style>
<body>
<h3 class=normal>this is some normal text</h3>
<br>
<h3 class=justify>this is some justified text</h3>
</body>
</html>"
?>
the code aligning right <p align="right">text</p>. try fit in needs be.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] [html] Right-Justify Text
Ubuntu
Comments
Post a Comment