<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0" xml:base="http://rtl-this.com">
<channel>
 <title>RTL-This</title>
 <link>http://rtl-this.com</link>
 <description>Tutorials and Articles on the RTL side of the Web. </description>
 <language>en</language>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/rtl-this" /><feedburner:info uri="rtl-this" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
 <title>RTLing Superfish Menu (jQuery Plugin)</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/CVn7kC8TYXk/rtling-superfish-menu-jquery-plugin</link>
 <description>&lt;p&gt;&lt;em&gt; Thank you Rami for the suggestion. &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Superfish is a very famous jQuery plugin that allows you to add eye-catching effects to dropdown menus (&amp;lt;ul&amp;gt;). It works perfectly in major browsers (including IE6 with some style limitations) too. Well in RTL..it's just not there..so we're going to RTL this one.&lt;/p&gt;
&lt;p&gt;What makes the superfish a very good plugin is that it doesn't specify or affect the layout/style of the menu itself, that's the CSS's job. That's why when you download the plugin with its example, you get one javascript file(superfish.js) which is responsible of the effect of showing/hiding menu items; and multiple CSS files for each style or type(horizontal, vertical and navbar).&lt;/p&gt;
&lt;p&gt;So what does that mean? RTLing this plugin is nothing more than RTLling the CSS using the very old and same method (flipping the properties/values).&lt;/p&gt;
&lt;p&gt;First, &lt;a title="Superfish Download Page" href="http://users.tpg.com.au/j_birch/plugins/superfish/#download"&gt;download&lt;/a&gt; the superfish plugin with its example (latest version at the moment of writing this tutorial is 1.4.8)&lt;/p&gt;
&lt;p&gt;Second, open the &lt;code&gt;superfish.css&lt;/code&gt;, &lt;code&gt;superfish-vertical.css&lt;/code&gt; and &lt;code&gt;superfish-navbar.css&lt;/code&gt; and flip the properties.&lt;/p&gt;
&lt;p&gt;The most important part to flip is the one labeled with "/*** ESSENTIAL STYLES ***/" at the beginning of the superfish.css. Scan through the rules to point out the values to flip. The flipped CSS rules will be:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css"&gt;
/*** ESSENTIAL STYLES ***/
.sf-menu li {float:right;}
.sf-menu li:hover ul,
.sf-menu li.sfHover ul {right:0;left:auto;}

ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {right:10em; left:auto;}

ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {right:10em; left:auto;}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This method of flipping overrides the original stylesheet in a new one. It is used more in multilingual websites where both directions are included. Learn more about it at the tutorial "&lt;a href="/tutorial/3-different-ways-rtl-your-css"&gt;3 Different Ways to RTL your CSS&lt;/a&gt;". You can directly modify the files if it's not your case.&lt;/p&gt;
&lt;p&gt;Then flip the /*** DEMO SKIN ***/ styles using the same rules in addition to the other CSS files. Below is the CSS for the default skin:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css"&gt;
/*** DEMO SKIN ***/
.sf-menu {float:right;}
.sf-menu a {border-right:1px solid #fff; border-left:none;}

/*** arrows **/
.sf-menu a.sf-with-ul {padding-left:2.25em; padding-right:1em;}
.sf-sub-indicator {right:auto;left:.75em; background-image:url('../images/arrows-ffffff-rtl.png');}
.sf-shadow ul {
	padding:0 0 9px 8px; background-position:left bottom;

	border-top-left-radius: 17px;
	border-bottom-right-radius: 17px;
	-moz-border-radius-bottomleft: 0;
	-moz-border-radius-topright: 0;
	-webkit-border-top-right-radius: 0;
	-webkit-border-bottom-left-radius: 0;

	-moz-border-radius-bottomright: 17px;
	-moz-border-radius-topleft: 17px;
	-webkit-border-top-left-radius: 17px;
	-webkit-border-bottom-right-radius: 17px;
	border-top-left-radius: 17px;
	border-bottom-right-radius: 17px;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;What's left is the background images. You can ignore flipping rules that style the arrows(background images) since it's a &lt;a href="http://css-tricks.com/css-sprites/" title="CSS Sprites: What They Are, Why They're Cool, and How To Use Them ..."&gt;CSS Sprite&lt;/a&gt; and background images are calculated exactly. All you need is flipping the arrows-ffff.png image horizontally and use the flipped one instead.&lt;/p&gt;
&lt;p&gt;Guess what? That's it! Your menu is now functioning perfectly in RTL as it is in LTR.&lt;/p&gt;
&lt;p&gt;If you're using superfish in your drupal installation(check the &lt;a href="http://adaptivethemes.com/add-superfish-drop-menus-to-any-theme-easily" title="Add Superfish Drop Menus to Any Theme, Easily"&gt;tutorial at adaptivethemes.com&lt;/a&gt; to do this), uploading the superfish-rtl.css style sheet will get it automatically included by drupal when the page is switched to an RTL language.
&lt;/p&gt;
&lt;p&gt;Check the Demo and/or download the Source files of the RTLed styles. Enjoy it!&lt;/p&gt;
&lt;h3&gt;Update @01-03-2010 14:00&lt;/h3&gt;
&lt;p&gt;Added a quick fix for IE6 RTL issues, both demo and source are updated.&lt;/p&gt;
&lt;h3&gt;Update @01-03-2010 14:35&lt;/h3&gt;
&lt;p&gt;Updated fixes to include IE7. Will address the issues in a separate tutorials&lt;/p&gt;
&lt;div class="field field-type-text field-field-demo-link"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;p&gt;&lt;a href="http://rtl-this.com/userfiles/demos/superfish/index.html"&gt;Demo&lt;/a&gt;&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/CVn7kC8TYXk" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/tutorial/rtling-superfish-menu-jquery-plugin#comments</comments>
 <category domain="http://rtl-this.com/category/tags/css">css</category>
 <category domain="http://rtl-this.com/category/tags/javascript">javascript</category>
 <category domain="http://rtl-this.com/category/tags/jquery">jquery</category>
 <category domain="http://rtl-this.com/category/tags/plugin">plugin</category>
 <pubDate>Sat, 20 Feb 2010 23:50:40 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">28 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/tutorial/rtling-superfish-menu-jquery-plugin</feedburner:origLink></item>
<item>
 <title>3 Different Ways to RTL your CSS</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/E7pMmvpa0h0/3-different-ways-rtl-your-css</link>
 <description>&lt;p&gt;There are three major ways I prefer to use when RTLing a webpage. Each one has its own pros and cons. They are actually the same..flipping CSS properties and rules is the same procedure in all ways. What's different is &lt;em&gt;where&lt;/em&gt; and &lt;em&gt;how&lt;/em&gt; are we flipping them.&lt;/p&gt;
&lt;p&gt;&amp;lt;!--break--&gt;&lt;/p&gt;
&lt;h2&gt;1- Same file.&lt;/h2&gt;
&lt;p&gt;The method used in the first &lt;a href="/tutorial/rtling-hello-world-webpage-rtling"&gt;RTL a webpage tutorial&lt;/a&gt;. We simply open the orignal CSS file and scan it for CSS rules to flip till we reach the end of file, save and it's RTLed.&lt;/p&gt;
&lt;h3&gt;PROs:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;No extra files or CSS rules.&lt;/li&gt;
&lt;li&gt;Which means no extra HTTP requests, bandwidth&amp;nbsp;or much effort.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Cons:&lt;/h3&gt;
&lt;p&gt;Useless if we're running a multilingual website..because we need both directions (if we're using bidirectional websites).&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;2- Independent Separate Files.&lt;/h2&gt;
&lt;p&gt;This method is the same as first one but instead of modifying the original stylesheet, we copy it (say styles-rtl.css) and modify that one.&lt;/p&gt;
&lt;h3&gt;PROs:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;We maintain the styles for both directions. So we serve the appropriate stylesheet according to the current language of the page.&lt;/li&gt;
&lt;li&gt;No extra files or CSS rules *&lt;/li&gt;
&lt;li&gt;Which means no extra HTTP requests or bandwidth **&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;*Assuming we didn't have to add bug fixes (*cough*IE*cough*)!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;** Remember we're serving only one style sheet in the page&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;CONs:&lt;/h3&gt;
&lt;p&gt;Hard to maintain and too much redundant CSS rules. For example, a CSS rule like &lt;code&gt;a{color:red;}&lt;/code&gt; will be duplicated in both files. And if you wanted to change it to green, you'll have to do it twice in both files.&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;3- Dependent Separate Files.&lt;/h2&gt;
&lt;p&gt;This method is a mix of the first two. We have 2 seperate files, but the second one only contains flipped CSS rules. For example if we're styling links in &lt;code&gt;styles.css&lt;/code&gt; as:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css"&gt;a{color:red; margin-left:10px;}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in the &lt;code&gt;styles-rtl.css&lt;/code&gt; stylesheet we'll only include the flipped rule:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css"&gt;a{margin-right:10px;}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And then we link both:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:html"&gt;
&amp;lt;link rel="stylesheet" type="text/css" href="styles.css"/&amp;gt;
&amp;lt;link rel="stylesheet" type="text/css" href="styles-rtl.css"/&amp;gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Make sure you include the overriding stylesheet after the original one to ensure the rules are overriden.&lt;/p&gt;
&lt;p&gt;But notice that the link in RTL now has a &lt;code&gt;margin-left&lt;/code&gt; of &lt;code&gt;10px&lt;/code&gt; &lt;strong&gt;AND&lt;/strong&gt; a &lt;code&gt;margin-right&lt;/code&gt; of &lt;code&gt;10px&lt;/code&gt; which is not what we want. We want the &lt;code&gt;margin-left&lt;/code&gt; to &lt;strong&gt;be&lt;/strong&gt; a &lt;code&gt;margin-right&lt;/code&gt;. In that case we &amp;quot;reset&amp;quot; the &lt;code&gt;margin-left&lt;/code&gt; like below:&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-style-span" style="background-color: rgb(231, 231, 231); "&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class="brush:css"&gt;a {margin-left:0; margin-right:10px;}&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;PROS:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Easy to maintain and modify. RTLed rules are much less and don't get frequently changed as much as the other ones. Now changing the color of the red link to green is going to be in one stylesheet only since it's not repeated in the flipped one.&lt;/li&gt;
&lt;li&gt;Great to use in big multilingual websites.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;CONs:&lt;/h3&gt;
&lt;p&gt;Extra files/size, 1 extra HTTP request. This can be avoided by merging the two files into one for your online deployment when you're all done. You can also compress it too for a smaller file size.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;How do you RTL your CSS? Which method of the 3 do you prefer? Or is there a different one?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/E7pMmvpa0h0" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/tutorial/3-different-ways-rtl-your-css#comments</comments>
 <category domain="http://rtl-this.com/category/tags/level/beginner">beginner</category>
 <category domain="http://rtl-this.com/category/tags/css">css</category>
 <pubDate>Wed, 17 Feb 2010 11:28:07 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">27 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/tutorial/3-different-ways-rtl-your-css</feedburner:origLink></item>
<item>
 <title>RTLing GD Star Rating Plugin (WP) (UPDATED)</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/KcK8dKtyTYY/rtling-gd-star-rating-plugin-wp</link>
 <description>&lt;p&gt;&lt;a href="http://wordpress.org/extend/plugins/gd-star-rating/" title="Rating WP Plugin"&gt;GD Star Rating&lt;/a&gt; is a &lt;a href="http://wordpress.org" title="Blogging Platform/CMS"&gt;WordPress&lt;/a&gt; plugin that allows your blog readers to rate your posts and pages. It is extremely flexible when it comes to appearance and language support*. Graphics and text are controllable via the plugin dahsboard. Even in RTL, the rating block is properly aligned (not 100%).&lt;br /&gt;
&lt;img src="/userfiles/image/screenshot-gd-star-rating.png" alt="Example of a rating blog of a WP post" height="81" width="258" /&gt;&lt;/p&gt;
&lt;p&gt;The problem is in the stars mainly...When you hover your mouse over the first star from the right, it should be the lowest rating button (1/10 for example). In RTL it's the opposite..the first star is actually the highest rate. Check the screenshot below:&lt;br /&gt;
&lt;img src="/userfiles/image/screenshot-gd-star-rating-rtl.png" alt="Rating block's problem in RTL. First Star is actually the last one" height="67" width="474" /&gt;&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Overriding the CSS (using FireBug) resulted with this very small CSS addition that should solve the problem. Append the below styles to your stylesheet (Dashboard -&amp;gt; Appearance -&amp;gt; Editor, edit the Stylesheet styles.css) and save. Voila!&lt;/p&gt;
&lt;p&gt;&lt;img src="/userfiles/image/screenshot-gd-star-rating-rtled.png" alt="Rating block RTLed" height="74" width="276" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css"&gt;
.gdthumb a,.ratepost .starsbar a,.rcmmpost .starsbar a,.ratemulti .starsbar a,.rcmmmulti .starsbar a,.ratecmm .starsbar a,.reviewcmm .starsbar a{right:0!important; left:auto!important;}
.gdthumbtext, .gdthumb,.thumblock .ratingloader ,.raterleft,.ratingtextmulti,.ratingstarsinline{ float: right!important;}
.raterright,.ratingbutton{ float: left!important; }
.mtrow td.mtstars,.gdouter,.loader{text-align:right!important;} &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The CSS is available to be downloaded below. Hope you enjoy this quick tweak.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;*Regarding the language support. I couldn't find a template for the Arabic translation for the plugin online. I'll work on translating the default values and post it soon. If anyone has (or know someone who has) translated it let me know please :)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE(08-02-2010 @15:10):&lt;/strong&gt; I missed an extra RTL issue which can be fixed by adding the below CSS rule.&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css"&gt;
.ratingblock .starsbar.gdsr-size-24 .gdinner { background-position:right -48px!important;} &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It fixes the background images'(stars) alignment which was causes rating to look like this:&lt;br /&gt;
&lt;img src="/userfiles/image/screenshot2-gd-star-rating-rtl.png" alt="Another RTL Issue in the rating block caused by the background-image property" height="31" width="249" /&gt;
&lt;/p&gt;
&lt;p&gt;
The source code is updated as well.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE(08-02-2010 @15:35):&lt;/strong&gt;&lt;em&gt;Also note this is a quick fix to the default settings (yellow stars with size of 24px). Will post a separate post to fix this for all types and sizes.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/KcK8dKtyTYY" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/tutorial/rtling-gd-star-rating-plugin-wp#comments</comments>
 <category domain="http://rtl-this.com/category/tags/css">css</category>
 <category domain="http://rtl-this.com/category/tags/plugin">plugin</category>
 <category domain="http://rtl-this.com/category/tags/widget">widget</category>
 <category domain="http://rtl-this.com/category/tags/wordpress">wordpress</category>
 <pubDate>Sat, 06 Feb 2010 12:30:47 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">26 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/tutorial/rtling-gd-star-rating-plugin-wp</feedburner:origLink></item>
<item>
 <title>RTLing Twitter's Widget</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/aaMDQLbaF_Q/rtling-twitters-widget</link>
 <description>&lt;p&gt;The &lt;a rel="homepage" title="Twitter" href="http://twitter.com" class="zem_slink"&gt;Twitter&lt;/a&gt; updates widget is maybe the most popular widget you can find on blogs. You can get yours from your settings page or by going to the &lt;a href="https://twitter.com/goodies"&gt;goodies &lt;/a&gt;page and choosing &lt;a href="https://twitter.com/goodies/widgets"&gt;widgets&lt;/a&gt;. Customizing it is super easy, you get to choose the colors, width and style of the widget itself. The direction though is always LTR. The good thing about the twitter is that it doesn't break in the RTL pages and it looks just fine. But to tweeples who tweet mostly in RTL languages (Like Arabic), it kind of doesn't fit in the RTL content of the whole page. Therefore, it's nice to see it flipped to go with the flow of their RTL page and tweets (what we are going to do now).&lt;/p&gt;
&lt;p&gt;&amp;lt;!--break--&gt;&lt;/p&gt;
&lt;p&gt;So basically we're going to flip the header (it's nice to see the avatar and the name to the right) and&amp;nbsp; the tweets. Check the table below to see the difference:&lt;/p&gt;
&lt;table&gt;
&lt;caption&gt;Twitter widget before and After RTLing&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;LTR&lt;/th&gt;
&lt;th&gt;RTL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="rtecenter"&gt;&lt;img width="300" height="307" alt="LTR - Twitter Widget" src="/userfiles/image/twitter-ltr.jpg" /&gt;&lt;/td&gt;
&lt;td class="rtecenter"&gt;&lt;img alt="RTL - Twitter Widget" src="/userfiles/image/twitter-rtl.jpg" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The code twitter gives you is a JavaScript code that writes your widget's HTML/CSS. RTLing the widget will be by overriding the CSS of the widget. What I used to to achieve this is the very famous &lt;a rel="wikipedia" title="Add-on (Mozilla)" href="http://en.wikipedia.org/wiki/Add-on_%28Mozilla%29" class="zem_slink"&gt;Firefox Extension&lt;/a&gt;: &lt;a href="http://getfirebug.com/"&gt;FireBug&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Grab the code and paste it into a testing page&amp;nbsp;(any HTML document or your blog) and open the page in your browser. Press F12 to show the Firebug console. Then right click the Element you want to flip and use the tips covered in the &amp;quot;&lt;a href="/tutorial/rtling-hello-world-webpage-rtling"&gt;RTLing a Hello World WebPage : RTLing&lt;/a&gt;&amp;quot; Tutorial.&lt;/p&gt;
&lt;p&gt;What I flipped is the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The spinning &amp;quot;loading&amp;quot; icon.&lt;/li&gt;
&lt;li&gt;The Twitter header (including the avatar, name and twitter handle)&lt;/li&gt;
&lt;li&gt;The tweet's direction, avatar and meta info (timestamp and reply icon).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Check the Demo link and download the source code to RTL your own twitter widget &lt;em&gt;(links below).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em style="color: red;"&gt;Note&lt;/em&gt;&lt;/strong&gt;: &lt;em&gt;Notice in the source code, the last rule that targets the selector &amp;quot;&lt;code&gt;.twtr-tweet-text&lt;/code&gt;&amp;quot; is for widgets that show the twitter avatar next to the tweet itself. Remove this line if you're using a widget with the &amp;quot;&lt;strong&gt;show avatars&lt;/strong&gt;&amp;quot; option is off.&lt;/em&gt;&lt;/p&gt;
&lt;div class="field field-type-text field-field-demo-link"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;p&gt;&lt;a href="http://rtl-this.com/userfiles/demos/twitter-widget/index.html"&gt;Demo&lt;/a&gt;&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/aaMDQLbaF_Q" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/tutorial/rtling-twitters-widget#comments</comments>
 <category domain="http://rtl-this.com/category/tags/css">css</category>
 <category domain="http://rtl-this.com/category/tags/twitter">twitter</category>
 <category domain="http://rtl-this.com/category/tags/widget">widget</category>
 <pubDate>Sun, 10 Jan 2010 23:24:17 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">24 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/tutorial/rtling-twitters-widget</feedburner:origLink></item>
<item>
 <title>Thank You</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/Z6AphzKAH28/thank-you</link>
 <description>&lt;p&gt;Can't express our happiness about the reaction we've been getting so far. Getting feedback and links to blogs that have been RTLed with the help of the tutorials posted here was just more than amazing *if you could just see the smile on my face right now*.&lt;/p&gt;
&lt;p&gt;Special thanks to &lt;a href="http://msahli.com/blog/" title="مدونة محمد الساحلي"&gt;Moh'd Sahli&lt;/a&gt; who was very kind to send me the &lt;a href="http://msahli.com/blog/archives/12" title="تلميحات لتعريب تصاميم المواقع"&gt;link to his guide&lt;/a&gt;[ar] he prepared during the &amp;quot;&lt;a href="http://arabtechies.net/codesprint/releases" title="Code Sprint Releases"&gt;Code Sprint&lt;/a&gt;&amp;quot; Event which was held in May 2009 in Cairo.&lt;/p&gt;
&lt;p&gt;The support this project received from the &lt;a href="http://arabtechies.net/"&gt;Arab Techies &lt;/a&gt;was amazing. &lt;a href="http://manalaa.net"&gt;Manal &lt;/a&gt;was great to send me the link to this Drupal Module &amp;quot;&lt;a href="http://drupal.org/project/jquery_bidi"&gt;Jquery Bidi&lt;/a&gt;&amp;quot; which:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Uses Jquery to automatically set directionality attributes of HTML elements based on first strongly directional letter in the element.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I will say it again here..I look at this project as a learning experience, I thought of starting it because I couldn't find enough sources about RTL for me to learn from. So if anyone has an idea, tutorial or project you're more than welcome to join :)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/Z6AphzKAH28" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/content/thank-you#comments</comments>
 <category domain="http://rtl-this.com/category/tags/drupal">drupal</category>
 <category domain="http://rtl-this.com/category/tags/guides">guides</category>
 <category domain="http://rtl-this.com/category/tags/modules">modules</category>
 <pubDate>Mon, 21 Dec 2009 09:03:10 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">23 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/content/thank-you</feedburner:origLink></item>
<item>
 <title>Background Images</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/m1Kk0LppoqU/background-images</link>
 <description>&lt;p&gt;Using backgrounds in CSS gives you the ability to control its position. It is done by controlling its position relativly to the 0,0 point which is the top left corner of the block. If you're rule has a background-position value of left top for example, flipping it to be right top wouldn't be a problem since right is a valid value.&lt;/p&gt;
&lt;p&gt;So where's the problem? Let's say you're flipping an LTR design, you come across a rule where the background-position is set to 20px 15px. This means that the image will be moved 20px from the left and 15px from the top.&lt;em&gt;Check the screenshot below.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img width="183" height="125" alt="" src="/userfiles/image/bgposition-example.png" /&gt;&lt;/p&gt;
&lt;p&gt;Now you need to flip it to move 20px from the right instead of the left. Unfortunately when the page's direction is flipped to RTL the 0,0 point of the block will remain to be the top left corner.&lt;/p&gt;
&lt;p&gt;There are many ways to solve this. We'll use a very common example where this issue can be faced, custom bullets of a list item &amp;lt;li&amp;gt;.&lt;/p&gt;
&lt;p&gt;The HTML is a simple UL:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:html"&gt;
&amp;lt;ul&amp;gt;
    &amp;lt;li&amp;gt;Link Item 1&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;Link Item 2&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;Link Item 3&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;Link Item 4&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;Link Item 5&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And the CSS is also simple:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css"&gt;
ul	{ list-style:none; border:1px solid #1b75bc; width:300px;
	  float:left; margin:0;padding:20px 0;}
	
ul li { background:transparent url('bullet.png') 10px 0 no-repeat;
		padding:0 30px; line-height:20px; border-bottom:1px solid #d8ecbd;
		margin:5px 0;}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The LTR list looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img width="315" height="187" alt="LTR Menu Screenshot" src="/userfiles/image/ltr-ul.png" /&gt;&lt;/p&gt;
&lt;h2&gt;1. Calculate the actual distance from the left&lt;/h2&gt;
&lt;p&gt;Simply you'll subract the offset of the bullet (20px in our example) from the container's width (300px in our example). So 300-20=280px. The RTLed background position will be: 280px 15px.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Pros:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;No need to manipulate the photo or add extra HTML or CSS&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Cons:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You'll need to know the width of the container (which isn't possible in fluid layouts). And if you changed the width of the container, moved the list to another block or used it somewhere else, you'll have to recalculate the new offset or use different values to each one.&lt;/p&gt;
&lt;h2&gt;2. Add the space to the image&lt;/h2&gt;
&lt;p&gt;Since the right is a valid value of the background-position rule, we can use it and add the whitespace to the image itself. We'll add extra 20px of white space to the right of our bullet picture and set its position to the right to have the effect that it's 20px away from the right edge. &lt;em&gt;Check the screenshot below of the bullet used.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img width="27" height="16" src="/userfiles/image/bullet-whitespace.png" alt="Bulluet with extra whitespace to the right" style="border:1px solid #2F5DA9" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Pros:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;No need to add extra HTML or CSS&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Cons:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You'll need to modify the photo each time you update the offset. Or worse, you'll end up having many images with different widths according to each offset you use in your design.&lt;/p&gt;
&lt;h2&gt;3. Use margin and padding&lt;/h2&gt;
&lt;p&gt;This method will also use the &amp;quot;right&amp;quot; keyword that can be used in the background-position rule. But instead of assigning the background image to the list item &amp;lt;li&amp;gt; itself, we'll wrap the content with a &amp;lt;span&amp;gt; for example and assign the background image to this span. Then we add the offset value (our 20px) as a right-margin. Finally, we'll set the right-padding of the span to the difference between the of the padding of the &amp;lt;li&amp;gt; and the bg-image offset (to move the content away from the image) after resetting the padding of the &amp;lt;li&amp;gt; itself (since we used them on the span).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Pros&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Can be modified easily and used anywhere.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Cons&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You will have to wrap the content of the &amp;lt;li&amp;gt; with a child. It's not really a con compared to how effective this method is. And extra content won't affect the layout if not used (the LTR styles won't need to be changed with the extra markup).&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;4. Avoid it :)&lt;/h2&gt;
&lt;p&gt;Okay this might be silly but if you can avoid setting an offset then why not? Do you have any other solutions or suggestions? Please share them in the comments&lt;/p&gt;
&lt;p&gt;The Source code of this tutorial is available to download. You'll see the three solutions available as three CSS classes. You can test them by changing the class assigned to the &amp;lt;ul&amp;gt; in the &amp;lt;div id=&amp;quot;rtl&amp;quot;&amp;gt; block.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/m1Kk0LppoqU" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/tutorial/background-images#comments</comments>
 <category domain="http://rtl-this.com/category/tags/background-image">background-image</category>
 <category domain="http://rtl-this.com/category/tags/css">css</category>
 <category domain="http://rtl-this.com/category/tags/level/intermediate">intermediate</category>
 <pubDate>Thu, 03 Dec 2009 10:46:31 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">22 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/tutorial/background-images</feedburner:origLink></item>
<item>
 <title>RTL-This Request</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/C-yXL9srjZY/rtl-request</link>
 <description>&lt;p&gt;Do you have an RTL This request? You found a template you like and you want it in RTL? Or you have a widget that doesn't look well in your RTL site? Maybe you're building an RTL page and need help?&lt;br /&gt;
Submit your request here and we'll make sure it's served.&lt;/p&gt;
&lt;form action="/content/rtl-request"  accept-charset="UTF-8" method="post" id="webform-client-form-20" class="webform-client-form" enctype="multipart/form-data"&gt;
&lt;div&gt;&lt;div class="webform-component-textfield" id="webform-component-name"&gt;&lt;div class="form-item" id="edit-submitted-name-wrapper"&gt;
 &lt;label for="edit-submitted-name"&gt;Name: &lt;span class="form-required" title="This field is required."&gt;*&lt;/span&gt;&lt;/label&gt;
 &lt;input type="text" maxlength="128" name="submitted[name]" id="edit-submitted-name" size="60" value="" class="form-text required" /&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="webform-component-textfield" id="webform-component-e_mail"&gt;&lt;div class="form-item" id="edit-submitted-e-mail-wrapper"&gt;
 &lt;label for="edit-submitted-e-mail"&gt;E-Mail: &lt;span class="form-required" title="This field is required."&gt;*&lt;/span&gt;&lt;/label&gt;
 &lt;input type="text" maxlength="128" name="submitted[e_mail]" id="edit-submitted-e-mail" size="60" value="" class="form-text required" /&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="webform-component-select" id="webform-component-type_of_request"&gt;&lt;div class="form-item" id="edit-submitted-type-of-request-wrapper"&gt;
 &lt;label for="edit-submitted-type-of-request"&gt;Type of Request: &lt;span class="form-required" title="This field is required."&gt;*&lt;/span&gt;&lt;/label&gt;
 &lt;select name="submitted[type_of_request]" class="form-select required" id="edit-submitted-type-of-request" &gt;&lt;option value="" selected="selected"&gt;select...&lt;/option&gt;&lt;option value="template"&gt;CMS Template&lt;/option&gt;&lt;option value="widget"&gt;Widgets and Badges&lt;/option&gt;&lt;option value="tips"&gt;CSS/HTML Tips&lt;/option&gt;&lt;option value="other"&gt;Other&lt;/option&gt;&lt;/select&gt;
 &lt;div class="description"&gt;&lt;p&gt;Choose the type of your request.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="webform-component-textarea" id="webform-component-request_details"&gt;&lt;div class="form-item" id="edit-submitted-request-details-wrapper"&gt;
 &lt;label for="edit-submitted-request-details"&gt;Request Details: &lt;span class="form-required" title="This field is required."&gt;*&lt;/span&gt;&lt;/label&gt;
 &lt;textarea cols="60" rows="5" name="submitted[request_details]" id="edit-submitted-request-details"  class="form-textarea resizable required"&gt;&lt;/textarea&gt;
 &lt;div class="description"&gt;&lt;p&gt;Enter the details of your request with a link to your template/widget or attachment. &lt;em&gt;Use services like box.net if you want to upload your attachment and paste the link here&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;input type="hidden" name="details[email_subject]" id="edit-details-email-subject" value="default"  /&gt;
&lt;input type="hidden" name="details[email_from_name]" id="edit-details-email-from-name" value="default"  /&gt;
&lt;input type="hidden" name="details[email_from_address]" id="edit-details-email-from-address" value="default"  /&gt;
&lt;input type="hidden" name="form_build_id" id="form-acea516af12ec82c9605afce5e32bbb6" value="form-acea516af12ec82c9605afce5e32bbb6"  /&gt;
&lt;input type="hidden" name="form_id" id="edit-webform-client-form-20" value="webform_client_form_20"  /&gt;
&lt;input type="submit" name="op" id="edit-submit" value="Submit"  class="form-submit" /&gt;

&lt;/div&gt;&lt;/form&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/C-yXL9srjZY" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/content/rtl-request#comments</comments>
 <pubDate>Thu, 03 Dec 2009 10:35:57 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">20 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/content/rtl-request</feedburner:origLink></item>
<item>
 <title>RTL in Silverlight</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/I6CPnAS1K2M/rtl-silverlight</link>
 <description>&lt;p&gt;&amp;nbsp;&lt;a target="_blank" title="Short tutorials for building Silverlight applications" href="http://www.silverlightrecipes.com"&gt;Silverlight recipes&lt;/a&gt; is into RTL as well. Learn &lt;a target="_blank" title="Adding RTL Support to Silverlight Using SilverlightRTL Library &amp;ndash; Part 1" href="http://www.silverlightrecipes.com/2009/03/adding-rtl-support-to-silverlight-using.html"&gt;how to add RTL support to Silverlight there&lt;/a&gt;. &lt;em&gt;Thanks Shady for the link.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/I6CPnAS1K2M" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/content/rtl-silverlight#comments</comments>
 <category domain="http://rtl-this.com/category/tags/links">links</category>
 <category domain="http://rtl-this.com/category/tags/microsoft">microsoft</category>
 <category domain="http://rtl-this.com/category/tags/silverlight">silverlight</category>
 <pubDate>Wed, 02 Dec 2009 17:58:38 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">21 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/content/rtl-silverlight</feedburner:origLink></item>
<item>
 <title>RTLing a Hello World WebPage : RTLing</title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/okGAWfPq14g/rtling-hello-world-webpage-rtling</link>
 <description>&lt;h2&gt;RTLing&lt;/h2&gt;
&lt;p&gt;Now we'll start flipping the CSS. Copy the &lt;strong&gt;ltr &lt;/strong&gt;folder and rename the new one &lt;strong&gt;rtl&lt;/strong&gt; (It's ready in the Source you'll download, you can move it to another place if you want to practice it yourself).&lt;/p&gt;
&lt;p&gt;In the index.html file change the path of the css file from &lt;strong&gt;ltr/styles.css&lt;/strong&gt; to &lt;strong&gt;rtl/styles.css&lt;/strong&gt; (what we did here is linking the new file we're going to flip)&lt;/p&gt;
&lt;p&gt;Open the styles.css file in your new &lt;strong&gt;rtl&lt;/strong&gt; folder to start flipping it.&lt;/p&gt;
&lt;h3&gt;Direction&lt;/h3&gt;
&lt;p&gt;The first thing we'll do is changing the direction of the whole html. Look for the first line to see&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css;"&gt;html{}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Add direction:rtl; between the curly braces to have:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css;"&gt;html{ direction:rtl; }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It's also recommended to add the attribute &lt;code&gt;dir="rtl"&lt;/code&gt; to the &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; tab in the HTML file so it'll render properly in case no CSS is loaded. &lt;/p&gt;
&lt;pre class="brush:css;"&gt;&amp;lt;html dir="rtl"&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;Note: The LTR version didn't explicitly specify the direction because the default is ltr.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Float&lt;/h3&gt;
&lt;p&gt;The float propery specifies how the blocks are floated horizontally (left or right) next to each others. Its value can be one of 3 different values: left,right and none. We're not interested in the &lt;strong&gt;none&lt;/strong&gt;. but our flipping will include nothing but replacing the left with a right and the right with a left.&lt;/p&gt;
&lt;p&gt;In our CSS,the &lt;code&gt;float:left&lt;/code&gt; are at lines 14, 23,36 and 38. Replace them with a &lt;code&gt;float:right&lt;/code&gt;. And the &amp;quot;float:&lt;strong&gt;right&lt;/strong&gt;&amp;quot; are at lines 15,16,21 and 34; Replace them with a &amp;quot;float:&lt;strong&gt;left&lt;/strong&gt;&amp;quot;. The table below shows the changes:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table style="width: 762px; height: 189px;"&gt;
&lt;caption&gt;&lt;em&gt;&lt;strong&gt;float:left into float:right&lt;/strong&gt;&lt;/em&gt;&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;LTR&lt;/th&gt;
&lt;th&gt;RTL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class="brush:css; "&gt;
            #logo {float:left;...}
            #content { ... float:left;}
            #footer-links{ float:left; ...} 
            #footer-links ul li {float:left; ...}
            &lt;/pre&gt;&lt;pre class="brush:css; "&gt;
            #topnav {float:right; ...} 
            #topnav li {float:right; ...}
            #sidebar {...float:right;} 
            #copyrights{float:right; ...} 
            &lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;
&lt;pre class="brush:css; "&gt;
            #logo {float:right;...}
            #content { ... float:right;}
            #footer-links{ float:right; ...} 
            #footer-links ul li {float:right; ...}
            &lt;/pre&gt;&lt;pre class="brush:css; "&gt;
            #topnav {float:left; ...} 
            #topnav li {float:left;...}
            #sidebar { ... float:left;} 
            #copyrights{float:left; ...} 
            &lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Margin and Padding&lt;/h3&gt;
&lt;p&gt;
Margins are the space between the edge of a block and its adjacent blocks(neighbors) while padding is the space between the border of the block and its inner content. These values can be specified at four sides: left, right, top and bottom. Ofcourse, when RTLing, we only flip the left and right margins/paddings.&lt;/p&gt;
&lt;p&gt;In CSS, you'll see sometimes margin/padding values like this:&lt;/p&gt;
&lt;pre class="brush:css; "&gt;
margin-left:10px;
padding-right:20px;
 &lt;/pre&gt;&lt;p&gt;It's simply straight forward, margin-left is for the left margin and padding-right is for the right padding. But sometimes you'll see it like this:&lt;/p&gt;
&lt;pre class="brush:css; "&gt;
margin: 10px 5px 7px 1px;
 &lt;/pre&gt;&lt;p&gt;It's a shorthand of combining the four directions in one rule (saves space and time). The four values are for the four directions in this order: &lt;code&gt;top right bottom left&lt;/code&gt; (it's like starting at the top and going clockwise). When RTLing, we swap the second and fourth values (right and left) to RTL this rule.
&lt;/p&gt;
&lt;p&gt;Another shorthand looks like this:&lt;/p&gt;
&lt;pre class="brush:css; "&gt;
margin: 10px 5px;
&lt;/pre&gt;&lt;p&gt;The first value is for the top and bottom values and the second value is for both left and right values. In this case we don't need to change this in RTL since the right and left are the same.&lt;/p&gt;
&lt;p&gt;The last shorthand looks like this:&lt;/p&gt;
&lt;pre class="brush:css; "&gt;
margin: 10px 5px 20px; 
&lt;/pre&gt;&lt;p&gt;The second value is for both left and right values and the first and third one are for the top and bottom values respectively. Again we'll leave it unchanged in RTL (same left and right).&lt;/p&gt;
&lt;p&gt;In our example, the margins need to be switched are at the lines 25 (&lt;code&gt;margin-left&lt;/code&gt; into &lt;code&gt;margin-right&lt;/code&gt;) and 38 (&lt;code&gt;margin-right&lt;code&gt; into margin-left&lt;code&gt;).&lt;/code&gt;&lt;/code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Text Align&lt;/h3&gt;
&lt;p&gt;
The text-align property's value can be one of three values: left, right, center and justify. center and justify aren't in question here. So you guessed it right, in RTLing, we change the &lt;code&gt;text-align:left&lt;/code&gt; into a &lt;code&gt;text-align:right&lt;/code&gt; and vice verca.&lt;/p&gt;
&lt;p&gt;In our example,we have text-align values that need to be switched since we only have a &lt;code&gt;text-align:center&lt;/code&gt; at line 14 which will be left unchanged.&lt;/p&gt;
&lt;h3&gt;Background Images&lt;/h3&gt;
&lt;p&gt;Background images can be assigned to specific blocks and their position can be controlled as well. When we RTL a page with some images, we sometimes flip these images horizontally if they're used as a part of the layout. After flipping the image, we'll need flip the horizontal position of the background image.&lt;/p&gt;
&lt;p&gt;The background position can be set in two ways:&lt;/p&gt;
&lt;p&gt;
Using directly the background-position property. It takes two values, the first one is the horizontal position(what we want) and the second one is the vertical position(which we'll leave unchanged in RTL).
&lt;/p&gt;
&lt;p&gt;
 The other way is in a background shorthand where the background is set in one rule (bg color, image, repeat and position). The position is found at the end of the rule like below:&lt;/p&gt;
&lt;pre class="brush:css; "&gt;
body {background:red url('image.png') no-repeat top left; }
&lt;/pre&gt;&lt;p&gt;In both ways, we'll change the left into a right and vice versa when we want to flip it. Don't forget to flip the image.&lt;/p&gt;
&lt;p&gt;In our example, the background image &lt;code&gt;bullet.gif&lt;/code&gt; is flipped and position is flipped at the line 8 .&lt;/p&gt;
&lt;h3&gt;Positions&lt;/h3&gt;
&lt;p&gt;Some tricky CSS positioning includes using the properties &lt;code&gt;left&lt;/code&gt; and &lt;code&gt;right&lt;/code&gt;. They control the position of the positioned block. In RTL, we (yes) swap the properties, the left becomes a right and vice versa.&lt;/p&gt;
&lt;p&gt;In our example, this kind of positioning isn't included so we won't do anything.&lt;/p&gt;
&lt;h3&gt;Fonts&lt;/h3&gt;
&lt;p&gt;You might want to change the font face and size of your page when you RTL a page and also translating it into Arabic for example. Even if you don't change the font face, you'll need to increase the font size by 1px or 2px (depends on the font). It's optional but I included it here because from my experience, I changed the font face and size in every page I RTLed.&lt;/p&gt;
&lt;p&gt;In our example, the font size is increased to be &lt;code&gt;13px&lt;/code&gt; at line  3.&lt;/p&gt;
&lt;h3&gt;That's it&lt;/h3&gt;
&lt;p&gt;All you have to do is open your &lt;code&gt;html&lt;/code&gt; file &lt;strong&gt;index.html&lt;/strong&gt; and change the path of the CSS file from &lt;code&gt;ltr/styles.css&lt;/code&gt; to &lt;code&gt;rtl/styles.css&lt;/code&gt; to load your RTL stylesheet. And ofcourse don't forget to change your text to Arabic or any RTL language :)&lt;/p&gt;
&lt;p&gt;I hope you found this small tutorial useful. You'll find again the source code below and a link to a demo page. &lt;em&gt;I modified the demo page and added an "RTL" link to the top menu to switch between the styles only (no HTML is modified).&lt;/em&gt;&lt;/p&gt;
&lt;div class="field field-type-text field-field-demo-link"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;p&gt;&lt;a href="/userfiles/demos/helloworld/index.html"&gt;Demo&lt;/a&gt;&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/okGAWfPq14g" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/tutorial/rtling-hello-world-webpage-rtling#comments</comments>
 <category domain="http://rtl-this.com/category/tags/level/beginner">beginner</category>
 <category domain="http://rtl-this.com/category/tags/css">css</category>
 <category domain="http://rtl-this.com/category/tags/html">html</category>
 <category domain="http://rtl-this.com/category/tags/tutorial">tutorial</category>
 <pubDate>Fri, 20 Nov 2009 20:12:56 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">19 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/tutorial/rtling-hello-world-webpage-rtling</feedburner:origLink></item>
<item>
 <title>RTLing a Hello World WebPage : Getting to Know the HTML/CSS </title>
 <link>http://feedproxy.google.com/~r/rtl-this/~3/Jmki6UCMP4Q/rtling-hello-world-webpage-getting-know-htmlcss</link>
 <description>&lt;p&gt;Now that everything is ready (a browser and a simple editor), we can start RTLing the simple hello world page. I'll be using Firefox and Notepad++ in this tutorial.&lt;/p&gt;
&lt;p&gt;The SRC of this tutorial is available at the end of this post. You'll find the HTML file with both LTR and RTL stylesheets and images.&lt;/p&gt;
&lt;p&gt;&amp;lt;!--break--&gt;&lt;/p&gt;
&lt;p&gt;The RTLing process involves modifying the CSS only. If you're not familiar with the difference between HTML and CSS, here it is:&lt;/p&gt;
&lt;p&gt;HTML is for markup and CSS is for styling. In English:&lt;/p&gt;
&lt;p&gt;With HTML, you just specify the purpose of your content, this block is a &amp;quot;link&amp;quot;, another block is a &amp;quot;paragraph&amp;quot;, some other block is a &amp;quot;table&amp;quot;...etc&lt;/p&gt;
&lt;p&gt;While with CSS, you specify the &amp;quot;style&amp;quot; of this block of content. That link is &amp;quot;red and bold&amp;quot;, that paragraph is &amp;quot;aligned to the right&amp;quot; and has a &amp;quot;blue background&amp;quot;, that table has a &amp;quot;height of 400px&amp;quot;. etc.&lt;/p&gt;
&lt;p&gt;That's why when we want to flip a page, we only change the CSS. A paragraph won't turn into a table in RTL, but its text alignment for example will change.&lt;/p&gt;
&lt;p&gt;So Let's start now:&lt;/p&gt;
&lt;h2&gt;The HTML&lt;/h2&gt;
&lt;p&gt;Download the source file. And Open the file &lt;strong&gt;index.html&lt;/strong&gt; in Notepad to view the following code&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:html;"&gt;
&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&amp;gt;
&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
&amp;lt;title&amp;gt;Hello World - RTL This&amp;lt;/title&amp;gt;

&amp;lt;link href="ltr/styles.css" type="text/css" rel="stylesheet" media="all"/&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;div id="wrap"&amp;gt;&amp;lt;div class="wrap-in"&amp;gt;

&amp;lt;div id="header"&amp;gt;
	
	&amp;lt;h1 id="logo"&amp;gt;&amp;lt;a href="#"&amp;gt;Hello World&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;
			
	&amp;lt;ul id="topnav"&amp;gt;
		&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Home&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;About Us&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Contact Us&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Search&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
	&amp;lt;/ul&amp;gt;
	
&amp;lt;/div&amp;gt;

&amp;lt;div id="body"&amp;gt;
	&amp;lt;div id="content"&amp;gt;
		&amp;lt;h2&amp;gt;Hello World Title!&amp;lt;/h2&amp;gt;
		
		&amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam viverra est et erat euismod blandit congue metus porttitor. Duis sollicitudin, ante at tincidunt accumsan, nisl leo rhoncus mi, id tempus dui velit a risus. Aenean gravida, dolor ac mollis fermentum, felis metus laoreet felis, vitae ullamcorper justo turpis sit amet nisi. Mauris laoreet turpis eget elit sodales eget vehicula sem consequat! Aliquam erat volutpat. Quisque auctor, metus non molestie semper, felis diam tempus leo, eget rutrum est arcu vitae orci. Mauris vitae mi in eros semper consectetur nec vulputate lectus! Suspendisse ac auctor libero. Duis ut neque euismod leo aliquet bibendum quis in enim. Quisque iaculis nisi tortor. Praesent quis tortor est. Integer eleifend iaculis magna. In et urna ac lectus rhoncus accumsan? Cras sodales lectus ac ligula dignissim sit amet luctus nisi dignissim! Ut neque metus, sagittis ut blandit at, gravida at urna.
&amp;lt;/p&amp;gt;
		&amp;lt;ul&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Lorem ipsum dolor sit amet&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Metus non molestie semper, felis diam tempus leo, eget rutrum est arcu vitae orci. Mauris vitae mi in eros semper consectetur nec vulputate lectus&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Felis metus laoreet felis, vitae ullamcorper justo turpis sit amet nisi. Mauris laoreet turpis eget elit sodales&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Mauris laoreet turpis eget elit sodales eget vehicula sem consequat! Aliquam erat volutpat. Quisque auctor&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Ut neque metus, sagittis ut blandit at, gravida at urna.&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
		&amp;lt;/ul&amp;gt;
	&amp;lt;/div&amp;gt;
	&amp;lt;div id="sidebar"&amp;gt;
		&amp;lt;h2&amp;gt;Latest News&amp;lt;/h2&amp;gt;
		&amp;lt;ul&amp;gt;
        	&amp;lt;li&amp;gt;
				&amp;lt;h3&amp;gt;February 27&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; - Dolor sit amet &amp;lt;/h3&amp;gt;
				&amp;lt;a href="#"&amp;gt;In et urna ac lectus rhoncus accumsan…&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			&amp;lt;li&amp;gt;
				&amp;lt;h3&amp;gt;March 3&amp;lt;sup&amp;gt;rd&amp;lt;/sup&amp;gt; - Lorem Ipsum &amp;lt;/h3&amp;gt;
				&amp;lt;a href="#"&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit…&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			
			&amp;lt;li&amp;gt;
				&amp;lt;h3&amp;gt;July 7&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; - Gami Suscipit &amp;lt;/h3&amp;gt;
				&amp;lt;a href="#"&amp;gt;Quisque iaculis nisi tortor. Praesent quis tortor est. Integer eleifend iaculis magna…&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
		&amp;lt;/ul&amp;gt;
	&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div id="footer"&amp;gt;
	&amp;lt;p id="copyrights"&amp;gt;Copyright &amp;copy; 2009 RTL This.&amp;lt;/p&amp;gt;
    
    &amp;lt;div id="footer-links"&amp;gt;
		&amp;lt;ul&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Privacy Policy&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Terms of Use&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
		&amp;lt;/ul&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You'll notice inside the &amp;lt;head&amp;gt; tag (between the &amp;lt;head&amp;gt; and &amp;lt;/head&amp;gt; lines) this line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:html;"&gt;
&amp;lt;link href="ltr/styles.css" type="text/css" rel="stylesheet" media="all"/&amp;gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is where the CSS file is included. Without this line, the Page will look like this (click to enlarge):&lt;/p&gt;
&lt;p&gt;&lt;a href="/userfiles/image/helloworld-no-css.png" target="_blank"&gt;&lt;img width="564" height="384" src="/userfiles/image/helloworld-no-css.png" alt="Screenshot - Hello World Page with no CSS loaded" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;The CSS&lt;/h2&gt;
&lt;p&gt;The linked CSS file is located at &amp;quot;&lt;strong&gt;ltr/styles.css&amp;quot;&lt;/strong&gt;. Open it in Notepad++ to view this code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="brush:css;"&gt;
html {}
h1,h2,h3,h4,h5,h6 {margin:0; padding:0;}
body {color:black; font-family:Arial, Helvetica, sans-serif; font-size:12px;}

a { color:#6D6E71;text-decoration:none;}
a:hover{color:#6DA6E2; text-decoration:underline;}
#body ul li {
	list-style:none;background:transparent url('bullet.gif') left .5em no-repeat; padding-left:10px;}
#wrap {width:770px; margin:0 auto;padding:10px 0;}

#header,#body,#footer{margin:0 20px;}

#header {border-bottom:1px dotted #6DA6E2; overflow:hidden;}
	 #logo {float:left;font-size:2em; color:#6DA6E2; width:25%; text-align:center;}
	 #topnav {float:right; list-style:none;}
	 #topnav li {float:right; margin:0 5px; border-bottom:1px solid #6DA6E2;}
	 

#body {overflow:hidden;}
#content { width:75%; float:left;}
#sidebar { width:24%; float:right;}

	#sidebar ul {
		list-style:none;
		margin-left:10px; padding:0;
		}
	#sidebar ul li{border-bottom:4px solid #EEEEEE; padding-bottom:5px; margin-bottom:5px;
		}
	#sidebar ul li h3 { font-size:1.2em;margin:0; padding:0;}
h2 { font-size:1.3em;color:#6DA6E2; margin:1em 5px;}


#footer {border-top:1px solid #6DA6E2;padding-top:10px;}
	#copyrights{float:right; margin:0; padding:0;}
	
	#footer-links{ float:left;  width:50%;}
	#footer-links ul { list-style:none; margin:0; padding:0;}
	#footer-links ul li {float:left; margin-right:10px; border-bottom:1px solid #6DA6E2;}
&lt;/pre&gt;&lt;/p&gt;
&lt;h3&gt; Now, let's RTL...part 3 (the last one) is next..&lt;/h3&gt;&lt;img src="http://feeds.feedburner.com/~r/rtl-this/~4/Jmki6UCMP4Q" height="1" width="1"/&gt;</description>
 <comments>http://rtl-this.com/tutorial/rtling-hello-world-webpage-getting-know-htmlcss#comments</comments>
 <category domain="http://rtl-this.com/category/tags/level/beginner">beginner</category>
 <category domain="http://rtl-this.com/category/tags/css">css</category>
 <category domain="http://rtl-this.com/category/tags/html">html</category>
 <category domain="http://rtl-this.com/category/tags/tutorial">tutorial</category>
 <pubDate>Fri, 20 Nov 2009 08:31:08 +0000</pubDate>
 <dc:creator>nightS</dc:creator>
 <guid isPermaLink="false">18 at http://rtl-this.com</guid>
<feedburner:origLink>http://rtl-this.com/tutorial/rtling-hello-world-webpage-getting-know-htmlcss</feedburner:origLink></item>
</channel>
</rss>
