Programmer's Resources
For the benefit of all programmers out there I am pleased to share some of my experience with you:
The hair-pulling bugbears
Every now and then I meet a hardly-docuemnted maddening quirk or pitfall that can take hours to find or work around. Hope this saves some baldness for some of you out there!
- The absent scrollbar: Google Chrome will NOT (as of Sept 2011) put a scrollbar on an overflowed <body> if it's RTL. Solution: Make a wrapper for the site one level down from the body and give it a style of "overflow: auto"
- The reverse scrollbar: In IE, if you accidentally put a LTR on the HTML elemnet but a RTL on the body element, your overflows will scroll AWAY from the content!
- The crazy mouseout: Having a link inside a div will register as having moused out when hovering over it despite being inside the hovered element (source). Solution: The above link has a complicated solution. A quick fix is to have the same "onmouseover" also on the links - then they stay. Strange hey?
- The flying RTL box: You may find that in IE 7 your floating elements fly out of your <div> if it's right-to-left. Don't bother looking in Google for the solution, this is the only place you'll find it: give the container div another container div that is "ltr" and make the inner one "rtl".