Page 1 of 1

change LTR To RTL for content Part in any template

Posted: Mon Dec 24, 2007 8:50 pm
by Arioman
there are many professional LTR Template and i really love theme , but i have a problem i can`t set Right Align ( justify ) for Post in Content.

i try to change template.css , index.php and ... but it confuse me ! 

there are many align line and character set ,

any one can help me . i just want to set justify in right ( persian LA ) in contect part , another part like menu and ... work good

Re: change LTR To RTL for content Part in any template

Posted: Wed Jan 02, 2008 4:47 am
by linuxer
Hi Arioman,
          I am facing the same issue with my site. I did solve many of parts of it till now. For the titles of your main menu items, go to your installation dir ---> modules ---> and edit mod_mainmenu.php as the following:
//********************************************************************************************
$indents = array(
// block prefix / item prefix / item suffix / block suffix
                  // changed the to
array( '', '' , '', '' ),
//*********************************************************************************************

Same steps for many of the module alignements in Joomla.
For the core site text alignement, Check your template.css and try to play around with the left and right padding/align stuff one at a time because this one depends on the first hand on the template code you are using wich differs from one another but keep in mind one important thing, that it may not be solved in the align/padding stuff, cause the number of PX controls the distance spacing also.
    The only thing that am facing trouble with is the align of the "." and "()" stuff, cause my site uses arabic language as the default but whenever I type in a statement or anything it appears to be in the right most of the paragraph. I am trying to solve it and see what happens.
    GOOD LUCK IN YOUR SITE

My Main Menu Desplaced! please help!

Posted: Sat Jan 05, 2008 8:42 am
by abdullah.khodadad
I converted an english template to RTL (right to left for Arabic and farsi use), but know in Internet Explorer browser, my main menu looks des place left !!!  :-\ please help me to solve this problem.
this is my page url : www.khabarpress.com have a lool please,
and this is my templete CSS code:

Code: Select all

html {
	height: 100%;
	margin-bottom: 1px;
}
body {
	margin: 0;
	padding: 0;
	height: 100%;
	color: #000000;
	direction:rtl;
}
#bg {
	background: #fff url('../images/np_bg.png') repeat-x 0 top;
}
form {
	margin: 0;
	padding: 0;
}
h1, h2, h3, h4, h5 {
	padding-bottom: 5px;
	margin: 10px 0;
}
/*fonts------------------------------------*/
body {
	font: normal 12px Arial, Helvetica, sans-serif;
}
a:link, a:visited {
	text-decoration: none;
	color: #003366;
}
a:hover {
	color: #000;
	text-decoration: underline;
}
ul {
	list-style: none;
	padding: 0 0 0 2px;
	margin: 0;
}
ul li {
	background: url('../images/arrow1.png') no-repeat 0 6px;
	margin: 0;
	padding-Right: 10px;
}
fieldset {
	border: 0;
	padding: 5px 0;
}
h1 {
	font-size: 170%;
}
h2 {
	font-size: 150%;
}
h3 {
	font-size: 130%;
}
h4 {
	font-size: 100%;
	text-transform: uppercase;
}
p {
	margin: 10px 0 10px;
}
ol {
	margin-top: 5px;
	margin-bottom: 15px;
}
ol li {
	margin-Right: 35px;
	line-height: 170%;
}
th {
	padding: 4px;
	font-weight: bold;
	text-align: Right;
}
fieldset {
	border: none;
}
fieldset a {
	font-weight: bold;
}
input, select {
	font: normal 12px Arial, Helvetica, sans-serif;
}
hr {
	border-top: 1px solid #C0C0C0;
	border-right: 0;
	border-Right: 0;
	border-bottom: 0;
	height: 1px;
}
a img {
	border: none;
}
td, div {
	font-size: 12px;
}
#nav a {
	font-size: 110%;
}
.contentheading, .componentheading, .contentpaneopen h2 {
	font: normal 16px Georgia, "Times New Roman", Times, serif;
}
.contentheading a:link, .contentheading a:visited {
	font: normal 16px Georgia, "Times New Roman", Times, serif;
}
.small, .smalldark, .createdate, .modifydate, .mosimage_caption, .back_button, .pagenavcounter, .pagenav, .pagenavbar {
	text-align:right;
	text-align:right;
	font: normal 10px Arial, Helvetica, sans-serif;
}
a.readon {
	font: normal 12px Arial, Helvetica, sans-serif;
}
table.contenttoc th {
	font: normal 12px Georgia, "Times New Roman", Times, serif;
}
.sectiontableheader {
	font: normal 14px Georgia, "Times New Roman", Times, serif;
}
.pagenav, .pagenav_prev, .pagenav_next, .pagenavbar {
	padding: 0 2px;
	font: normal 10px Arial, Helvetica, sans-serif;
}
a.pagenav, .pagenav_prev a, .pagenav_next a, .pagenavbar a {
}
a.pagenav:hover, a.pagenav:active, a.pagenav:focus, .pagenav_prev a:hover, .pagenav_prev a:active, .pagenav_prev a:focus, .pagenav_next a:hover, .pagenav_next a:active, .pagenav_next a:focus, .pagenavbar a:hover, .pagenavbar a:active, .pagenavbar a:focus {
}
div#newsflash table td {
	font: normal 11px Arial, Helvetica, sans-serif;
}
/*joomla style-----------------------------------------------*/
.contentheading {
	color: #690000;
	text-transform: uppercase;
}
.contentheading a:link, .contentheading a:visited {
	color: #690000;
	text-transform: uppercase;
	text-decoration: none;
}
.contentheading a:hover {
	text-decoration: underline;
	color: #000;
}
.contentpaneopen h2 {
	color: #690000;
	padding: 0;
	margin: 0;
}
.small, .modifydate, .createdate, .mosimage_caption, .back_button {
	color: #999;
}
.smalldark {
	color: #888888;
	text-align: Right;
}
div.syndicate div {
	text-align: center;
}
.modifydate {
text-align:right;
	padding-top: 6px;
}
.mosimage_caption {
	padding-top: 3px;
	padding-bottom: 3px;
}
.sectiontableentry1, .sectiontableentry2 {
	border-bottom: 1px solid #c7c7c5;
}
.componentheading {
	color: #000;
	text-align: Right;
	margin-bottom: 10px;
}
table.contenttoc {
	margin: 0 0 10px 10px;
	padding: 0;
	background-color: #EFF0ED;
	border: 1px solid #C7C7C5;
	width: 200px;
}
table.contenttoc td {
	padding: 1px 5px 1px 18px;
	background: url('../images/arrow1.png') no-repeat 7px 50%;
}
table.contenttoc th {
	padding: 2px 4px;
	background-color: #EFF0ED;
	border-bottom: solid 1px #C7C7C5;
	color: #690000;
	text-indent: 15px;
	text-align: Right;
	text-transform: uppercase;
}
.contentpaneopen {
	width: 100%;
}
.contentpaneopen1 {
	width: 100%;
}
table.contentpane {
	width: 100%;
	margin-bottom: 30px;
}
.sectiontableheader {
	background-color: #EFF0ED;
	border-bottom: 1px solid #C7C7C5;
	border-top: 1px solid #C7C7C5;
	color: #000;
}
tr.sectiontableentry1 td, tr.sectiontableentry2 td {
	border-bottom: 1px solid #eeeeee;
	height: 20px;
}
.highlight {
	background-color: #ffff99;
}
.contentpane {
	width: auto;
}
table.poll {
	padding: 0;
	width: 100%;
	border-collapse: collapse;
}
table.pollstableborder, table.pollstableborder-black {
	padding: 0;
	width: 100%;
	border: none;
	text-align: Right;
}
table.pollstableborder img, table.pollstableborder-black img {
	vertical-align: baseline;
}
.clr {
	clear: both;
}
table.searchintro {
	padding: 10px 0;
	width: 100%;
}
table.searchintro td {
	padding: 5px!important;
}
table.adminform {
	width: 400px!important;
}
.adminform .inputbox {
}
/*display blocks ----------------------------------------------*/
div#wrapper_1 {
	background: url('../images/np_wrapper_bg_1.png') repeat-y 0 top;
	width: 992px;
	margin: 0 auto;
	padding: 0;
}
div#wrapper_2 {
	background: url('../images/np_wrapper_bg_2.png') no-repeat 0 top;
	width: 992px;
}
div#wrapper_page {
	background: none;
	width: 980px;
	position: relative;
	margin: 0 6px 0 6px;
	padding: 0;
}
div#bg_menu {
	background: transparent url('../images/np_menu_bg.png') repeat-x 0 top;
	width: 980px;
	padding: 0;
	margin: 0;
	height: 123px;
}
div#top {
	width: auto;
	height: 65px;
	padding: 0;
}
#logo {
	float: Right;
	background: transparent url('../images/np_logo.png') no-repeat 0 top;
	height: 94px;
	width: 980px;
	display: block;
}
div#top_Left {
	float: Right;
	position: relative;
	width: 747px;
	height: 65px;
}
div#top_menu {
	background: transparent url('../images/np_menu_top_bg.png') repeat-x 0 top;
	height: 23px;
	width: 739px;
	position: absolute;
}
div#newsflash {
	position: absolute;
	height: 42px;
	width: 500px;
	top: 23px;
	display: block;
	overflow: hidden;
	right: 5px;
	margin-left: 8px;
}
div#newsflash table td {
	color: #fff;
	padding: 0;
	margin: 0;
}
div#spacer {
	clear: both;
	background: url('../images/np_top_right_spacer.png') repeat-x 0 top;
	height: 2px;
	width: 960px;
	display: block;
	padding: 0;
	margin: 0 10px 0 10px;
}
div#belka {
	height: 29px;
	width: 960px;
	display: block;
	padding: 0;
	margin: 0 10px 0 10px;
}
div#search {
	background: url('../images/np_search.png') no-repeat 0 top;
	position: absolute;
	top: 67px;
	height: 25px;
	padding: 4px 0 0 67px;
}
div#membersarea {
	background: url('../images/np_membersarea.png') no-repeat 0 top;
	position: absolute;
	top: 67px;
	right: 9px;
	height: 25px;
	color: #fff;
	padding: 4px 0 0 120px;
}
div#fontsize {
	position: absolute;
	top: 73px;
	right: 8px;
	height: 25px;
	color: #fff;
	height: 25px;
	width: 89px;
}
div#majmenu {
	position: absolute;
	top: 96px;
	background: url('../images/np_maj_menu_bg.png') repeat-x 0 top;
	width: 980px;
	padding-top: 1px;
	height: 26px;
}
div#mainpage {
	background: url('../images/np_mainpage_bg.png') repeat-x 0 0;
	width: 100%;
	height: 100%;
}
div.mainwrap {
	clear: both;
	width: 970px;
	margin: 0 0 0 10px;
	padding: 0;
}
div#mainbody {
	margin: 0 10px 20px 10px;
	padding: 0;
	width: 960px;
}
table#majtable {
	clear: both;
	width: 100%;
	margin: 0;
	padding: 0;
}
td.inseter {
	width: 240px;
}
td.sp {
	width: 10px;
}
div.usfloat {
	float: Right;
	overflow: hidden;
}
div.us {
	padding-left: 10px;
	text-align: Right;
}
div#space {
	clear: both;
	padding-bottom: 60px;
}
/*foofter links-------------------------------------*/
div#footer {
	background: url('../images/np_bg_footer.png') repeat-y 0 top;
	width: 992px;
	height: 51px;
	margin: 0 auto;
	padding: 0;
	text-align: center;
}
div#footer p {
	margin: 0;
	padding-top: 8px;
}
#gavick {
	background: url('../images/logo_gavick.png') no-repeat;
	display: block;
	width: 86px;
	height: 19px;
	margin: 0 auto;
}
/*loginbox -----------------------------------------------------------*/
#membersarea input {
	border: 1px solid #690000;
	vertical-align: middle;
}
#membersarea input.inputbox {
	padding-left: 4px;
	width: 100px;
}
div.logout {
	display: inline;
	text-align: right;
}
/*top search ---------------------------------------------------------*/
#search .search {
	margin: 0;
}
#search .search input {
	border: 1px solid #000;
}
#search input.inputbox {
	padding-right: 4px;
	width: 135px;
}
/*end*/
/*pathway----------------------------------------------------------*/
div#pathway {
	width: 960px;
	display: block;
	height: 16px;
	margin: 0 0 12px 10px;
	padding: 12px 0 0 0;
}
div#pathway span {
	display: inline;
	font-size: 10px;
	color: #000;
	text-transform: uppercase;
}
span.pathway {
	float: right;
	background: url('../images/np_pathway_home.png') no-repeat 0 0;
	padding-left: 24px;
}
span.pathway, a.pathway, span#clock {
	padding-top: 1px;
}
a.pathway:link, a.pathway:visited {
	color: #6e0000;
	text-decoration: none;
}
a.pathway:hover {
	color: #000;
	text-decoration: none;
}
span#clock {
	float: left;
	background: url('../images/np_pathway_date.png') no-repeat 0 0;
	margin: 0;
	padding: 0;
	padding-left: 37px;
}
/*top menu----------------------------------------------*/
div#top_menu ul {
	height: 23px;
	width: 739px;
	overflow: hidden;
	margin: 0;
	padding: 0;
	list-style-type: none;
}
div#top_menu ul li {
	float: right;
	list-style: none;
	margin-top: 4px;
	list-style-type: none;
	background: none;
}
div#top_menu a.mainlevel-nav {
	background: transparent url('../images/np_menu_top_li.png') no-repeat right top;
	font: bold 0.9em Arial, Helvetica, sans-serif;
	color: #cecbcb;
	margin-left: 0;
	padding: 0 10px 0 0;
	text-align:right;
}
div#top_menu a.mainlevel-nav:link, div#top_menu a.mainlevel-nav:visited {
	text-decoration: none;
}
div#top_menu a.mainlevel-nav:hover {
	text-decoration: none;
	color: #fff;
}
/*module - display news--------------------------------*/
.dgmnews img, .dgmnews-grey img {
	background-color: #eaeae4;
	border: 1px solid #c7c7c5;
	padding: 3px;
	margin: 0 3px 0 0;
}
.dgmnews a.contentheading, .dgmnews-grey a.contentheading {
	font: bold 12px Arial, Helvetica, sans-serif;
	color: #660000;
}
/*Typography-----------------------------*/
span.pin {
	background: #f8f9d4 url('../images/np_typo_clip.png') no-repeat 0 50%;
	color: #333;
	border: 1px solid #ddb;
	display: block;
	padding: 10px 10px 10px 42px;
	margin-bottom: 10px;
}
span.contact {
	background: #f8f9d4 url('../images/np_typo_contact.png') no-repeat 0 50%;
	color: #333;
	border: 1px solid #ddb;
	display: block;
	padding: 10px 10px 10px 42px;
	margin-bottom: 10px;
}
span.grey {
	background-color: #cccccc;
	color: #000;
	border: 1px solid #999999;
	display: block;
	padding: 10px 10px 10px 10px;
	margin-bottom: 10px;
}
span.maroon {
	background-color: #940000;
	color: #fff;
	border: 1px solid #640303;
	display: block;
	padding: 10px 10px 10px 10px;
	margin-bottom: 10px;
}
span.beige {
	background-color: #eaeae4;
	color: #333;
	border: 1px solid #dcdcd4;
	display: block;
	padding: 10px 10px 10px 10px;
	margin-bottom: 10px;
}
span.zoom {
	background: transparent url('../images/np_typo_zoom.png') no-repeat 0 50%;
	color: #333;
	display: block;
	padding: 10px 10px 10px 42px;
	margin-bottom: 10px;
}
span.camera {
	background: transparent url('../images/np_typo_camera.png') no-repeat 0 50%;
	color: #333;
	display: block;
	padding: 10px 10px 10px 42px;
	margin-bottom: 10px;
}
blockquote {
	background: transparent url('../images/np_quoleft.png') no-repeat 0 0;
}
blockquote div {
	padding: 0 48px;
	background: transparent url('../images/np_quoright.png') no-repeat right bottom;
}
div.highli {
  background: transparent url('../images/storyhighl.png') no-repeat 0 0;
  border: 1px solid #a30101;
  padding: 23px 5px 5px 5px;
}

img.border {
	background-color: #eaeae4;
	border: 1px solid #c7c7c5;
	padding: 3px;
	margin: 2px 3px 0 0;
}

Re: My Main Menu Desplaced! please help!

Posted: Thu Sep 25, 2008 8:01 am
by Arioman
i can`t help you just with Css Code , i must see the Complete Template.

but maybe you must change the Mainmenu Window position From Left To Right and Then Align text to right too.

Re: change LTR To RTL for content Part in any template

Posted: Thu Jan 29, 2009 5:44 am
by eyashwant
I just want to change the top menu of the template to rlt from ltr. Does any one has any idea about it.

Re: change LTR To RTL for content Part in any template

Posted: Sun May 01, 2011 1:49 pm
by aikzhobi
linuxer wrote:Hi Arioman,
          I am facing the same issue with my site. I did solve many of parts of it till now. For the titles of your main menu items, go to your installation dir ---> modules ---> and edit mod_mainmenu.php as the following:
//********************************************************************************************
$indents = array(
// block prefix / item prefix / item suffix / block suffix
                  // changed the to
array( '', '' , '', '' ),
//*********************************************************************************************

Same steps for many of the module alignements in Joomla.
For the core site text alignement, Check your template.css and try to play around with the left and right padding/align stuff one at a time because this one depends on the first hand on the template code you are using wich differs from one another but keep in mind one important thing, that it may not be solved in the align/padding stuff, cause the number of PX controls the distance spacing also.
    The only thing that am facing trouble with is the align of the "." and "()" stuff, cause my site uses arabic language as the default but whenever I type in a statement or anything it appears to be in the right most of the paragraph. I am trying to solve it and see what happens.
    GOOD LUCK IN YOUR SITE
But where to add this code ?
In start ? or End ?

Re: change LTR To RTL for content Part in any template

Posted: Sun May 01, 2011 3:25 pm
by infograf768
aikzhobi wrote: But where to add this code ?
In start ? or End ?
Are you using the older Joomla 1.0 version?

Re: change LTR To RTL for content Part in any template

Posted: Sun May 01, 2011 4:47 pm
by aikzhobi
infograf768 wrote:
aikzhobi wrote: But where to add this code ?
In start ? or End ?
Are you using the older Joomla 1.0 version?
No.
I am using joomla 1.5

Re: change LTR To RTL for content Part in any template

Posted: Mon May 02, 2011 5:00 am
by infograf768
Please use the 1.5 sub-forums to post any question as this topic is obsolete.

Generally speaking, you do not have to change any core files in 1.5 to get RTL.
All depends on the CSS loaded by your template when the language is RTL.

If your language is not RTL but you need to enter some RTL text in one of your articles, then the tag can be added in the editor.