3 Different Ways to RTL your CSS

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 where and how are we flipping them.

1- Same file.

The method used in the first RTL a webpage tutorial. 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.


  • No extra files or CSS rules.
  • Which means no extra HTTP requests, bandwidth or much effort.


Useless if we're running a multilingual website..because we need both directions (if we're using bidirectional websites).

 2- Independent Separate Files.

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.


  • We maintain the styles for both directions. So we serve the appropriate stylesheet according to the current language of the page.
  • No extra files or CSS rules *
  • Which means no extra HTTP requests or bandwidth **

*Assuming we didn't have to add bug fixes (*cough*IE*cough*)!

** Remember we're serving only one style sheet in the page


Hard to maintain and too much redundant CSS rules. For example, a CSS rule like a{color:red;} 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.

 3- Dependent Separate Files.

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 styles.css as:

a{color:red; margin-left:10px;}

in the styles-rtl.css stylesheet we'll only include the flipped rule:


And then we link both:

Make sure you include the overriding stylesheet after the original one to ensure the rules are overriden.

But notice that the link in RTL now has a margin-left of 10px AND a margin-right of 10px which is not what we want. We want the margin-left to be a margin-right. In that case we "reset" the margin-left like below:

a {margin-left:0; margin-right:10px;}


  • 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.
  • Great to use in big multilingual websites.


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.

How do you RTL your CSS? Which method of the 3 do you prefer? Or is there a different one?

Average: 4.4 (32 votes)


A good practice that I usually follow is to add a comment after each rule in the original CSS file for RTL sensetive rules, for example:

margin-left: 10px /* rtl-review */

This way I can go back and only copy the marked rules to the RTL file and override it there. Also with advanced text comparison tool i can see both files side by side to make sure all rules are covered by filtering for my remark /* rtl-review */

That's an excellent tip!! Can't believe I haven't thought of it before!
Thank you :)

When the jailer saw the doors were opened he desired to kill
himself. Tap the "Complete Upgrade" button in the pop up dialog box.
Be sure your iPhone is correctly activated on your own actual supplier first.

Here's another tip:
Instead of using float:right and float:left inside many classes. Remove all of those and create two new classes

Now in the RTL version, just use ur CSS overriding mechanism to swap them so that .right floats left and vice versa!

You don't need to change your code else where

The Chaise Lounge Collection from Lloyd Loom of Spalding; see below and ask lots of time.
People prefer pure wood furniture has grosfillex bahia its drawbacks.
All of 'em have good taste is really a good investment or not.
Patio furniture, this is an essential part of the furniture has never been more vital.

Maybe, I cut the half-lap in the world of social networking and blogging and with easy clean up all outdoor furniture
that matches the d cor. Many Stores Stock Different AccessoriesIn addition to slip on covers.

I am just blown away using this product, I lost lost
8 kilos from the very first full week. By the
end of the thirty days I needed dropped 20 kilos. This has
been huge support. This assisted stop my urges specifically the carbs, in addition, it increase the
speed of my metabolism. I employed to take in bread and
pastas just about everyday. Following utilizing the capsules I
haven't enjoyed a lot carbohydrates, might be one half of bagel in the morning the moment.
In any case, I am certain which i will reach my target
of losing 45 lbs at the end of the following month.
I am just extremely exited. What aid me the most was the next: 1.
I shut down all the sweetener refreshments and merely drank standard water 2.
No Sweets inside my espresso just creme or dairy products 3.
I went around my stop twice right after emerging property from job (simply to drop added
energy) Use this merchandise! ! You won't be let
down. and remember that you don't must pay a gym registration as a way to burn up several calorie consumption.
Just move around your obstruct no less than three times a have confidence in and week me you will realize the final results.

Are you sure you're not helping Anonymous with Megaupload.
So with this popularity, you would think Activision would support these titles and the countless players that sign-on each day to play.

Hack said the team considered that game the finals.
They even beat the University of Virginia - the team that triumphed over UNC in the finals of Wolfpack, NC State University's
fall tournament - with a final score of 10-1.

This is not a scam oor an acquire abundant systems. You wont be making enough to earn a living however you
can save an added $20-$100 each month.


Is it possible to style via css the <p dir="RTL"> without class or id ?

You can just add the css properity {direction: rtl} into the body class!

They could belong to a particular age group, geographical region as well as educational background.
Peter operates a forum to help marketers who are
interested in mobile affiliate marketing. Real estate mobile marketing
gives realtors new, fresh ways to reach out to
potential clients.

They could belong to a particular age group, geographical region as well as educational background.
Peter operates a forum to help marketers who are
interested in mobile affiliate marketing. Real estate mobile marketing
gives realtors new, fresh ways to reach out to
potential clients.

Over 90% oof the US population owns a cell phone compared toonly 30% whho
own a smart phone. And that was beginning of whole this mobile monopoly thing.
Seattle Sun Tan started the next promotion, advertising the launch of their SMS
campaign to over 80,000 customers from theur database.

Pour éclairer le chemin qui vous mènera
à l'utilisation de code PSN gratuitement en 1 minute,
nous vous proposons de suivre ces quelques 3 étapes.

Thanks for finally talking about >Add new comment | RTL This <Loved it!

Hi there, its fastidious piece of writing regarding media print,
we all be familiar with media is a great source of facts.

However things does not always have to be this way. 5mm headphone jack, micro SD
card slot, camera button, a mini USB port, and a phone lock are all present to assist the anxious user.
Reverse number lookup services can be establish online annd are
extremely simple to utilize.

And your icons will load quicker, producing your change to just
about every program very easily. So when you're considering iPhone
4, one has to to begin before unlocking the unit
jailbreak it.

Very useful online tool to flip CSS code:


This tool has been developed and moved to a separated new domain:

I have read a few good stuff here. Certainly price
bookmarking for revisiting. I surprise how much effort you put
to make such a magnificent informative web site.

Obsłużyli mnie szybko i profesjonalnie Laserowe usuwanie owłosienia cena Gliwice

They start playing golf easily on a Actively playing
golf Fee Card. This is a matter that many parents need to deal with in the best way possible.
your take-off point otherwise Lucca is quite cheap for a holiday getaway.
The festivals are one of akin and celebrations are almost every day.

They start playing golf easily on a Actively playing
golf Fee Card. This is a matter that many parents need to deal with in the best way possible.
your take-off point otherwise Lucca is quite cheap for a holiday getaway.
The festivals are one of akin and celebrations are almost every day.

I have been exploring for a bit for any high quality articles
or blog posts on this kind of space . Exploring in Yahoo I finally stumbled upon this web site.
Studying this info So i am satisfied to show that I have an incredibly excellent uncanny feeling I discovered just what I needed.

I most indubitably will make sure to don?t omit this website and provides it a look on a constant basis.

Taking Online Business Profits to Greater Heights with SEO.
SEO helps in finding those customers who can do business with
you. most of the time, you will find that as long as you are a
bit technical, you will be able to do the SEO on your own.

I am actually ցrateful to the owner of this web
pge who has shaared this wonderful post att at
this place.

There are grosfillex furniture so vital. That just
would noot let down your list of Web sites where yyou will look att the web.
Everyoe knows thee material as well as wrought iron becwuse it can be
quite inexpensive and easy folding set. With a swanky, totally outdoor presentation system and speakers inside, but you need to know where
the wood grain.

Create the alphabet in order on the blackboard and recite each and every letter wuth your students.

Dobre, dobre, dobre rekomenduję każdemu! Programy Do Tworzenia Stron Www

Thanks to my father who told me about this website, this web site is
genuinely amazing.

Nadzwyczaj fajny post, badawcze teksty zalecam
wszystkim literaturę Zagraj WEuro Milion

Pay attention to ttrends oon the Internet as things are constantly changing.
Speaking of easy ways tto make money online, I believe you
may have heard how affiliate marketers tend to be
somewhat dubious because they do not provide their leads with
real value. Among manyy things, the language and fashion in the workplace is alsao a
constant reminder of the ever changing differences.

Badawcze spojrzenie na myśl, każdy winien rozczytać oraz zapoznać się z tematem.
Lifting Twarzy

If anything, using one proves that you are actually an unskilled player.
On Sunday, Pleiades faced some greater challenges, winning a hard-fought game against Florida 7-2.

People love breaking the rules, and hackers have been around since the dawn of
videogames. This genre has been popular for decades and will continue
to grow in popularity.

For latest information yyou have to pay a quick visdit world wide web and on the web I found
this website as a most excellent web page for hottest updates.

Fabulous, what a weblog it is! This blog presents helpful data to us, keep it up.

Interesujące spojrzenie na sprawę, każdy powinien rozczytać
dodatkowo zaznajomić się z tematem.

Ciekawe spojrzenie na kwestię, każdy powinien przeczytać także zaznajomić się z tematem.
Place zabaw dla dzieci

 Bastante impactante el titulo emlero para nada tanto como comentaban

 Me ha agradado extremadamente este juegos aunque muy pequeno

Tematyka bliska każdemu, zalecam lekturę Pozycjonowanie Stron Cennik

Plus some honey or another organic sort straightforward sugar, especially if you happen to be performing extended
endurance workouts.

Please update the link bothe are not available :(

Undeniably believe that which you stated. Your favorite justification seemed
to be on the web the easiest thing to be aware of. I say to
you, I certainly get irked while people consider worries that they just don't know
about. You managed to hit the nail upon the top as well as defined out the whole thing
without having side effect , people could take a signal.
Will likely be back to get more. Thanks

While the conventional job gives them a regular salary, their online business boosts their income to help
pay for everyday wants and needs. When we hear about online surveys for
money we often tend to react the same way we would react towards a spam email not knowing that this so called spam content can help us get a financial boost and if
taken seriously, can generate more income online than our regular income.
Little streams eventually become overflowing rivers
and a what looks like modest income source when combined
with other revenue sources can prove to become a decent online income.

Hi to every body, it's my first pay a visit of this blog;
this weblog carries remarkable and really excellent data in favor of visitors.

Trendy!! I agree with the methods you have displayed in your post "Add new comment | RTL This",
although.. I am discovering difficulty with ones RSS :(
My spouse and i don’t know the reason My spouse and i are not able to subscribe to the idea, perhaps there is someone else acquiring equivalent problems?
anyone whom is aware of the answer are you going to kindly react?

Appreciate it!

Admiring the dedication you put into your blog and detailed information you provide.

It's awesome to come across a blog every once in a while
that isn't the same unwanted rehashed information. Wonderful read!
I've bookmarked your site and I'm including your RSS feeds to my Google account.


Add new comment

Twitter Updates

Recent comments

Who's online

There are currently 0 users online.