2009年5月13日星期三

Auto margin on RTL page doesn't work on IE

Auto margin is used extensively to center an element horizentally. But it doesn't work on IE for RTL pages.

A solution is found here :

Set the direction of <html> element to "ltr" while setting the direction of <body> element to "rtl". I tried this solution, it works. Great!

html {direction:ltr;}
body {direction:rtl;}

Technology changes life