/** * * XHTML 1.1 Ruby markup suffers from the "browsers don't always bother to obey CSS" problem. * The standard way to visualise ruby is by making the ruby code an inline table, and bottom * aligning it. However, not all browsers understand "bottom". or "baseline". This javascript * will try to make sure the ruby placement is correct for all major browsers by detecting the * browser, and modifying the ruby CSS rules accordingly. * * - Mike "Pomax" Kamermans */ // ---------------------------------------------------------------------------------------------------------------------- // CSS MANIPULATION // // based on http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript // ---------------------------------------------------------------------------------------------------------------------- function getCSSRule(ruleName, deleteFlag) { ruleName=ruleName.toLowerCase(); if (document.styleSheets) { for (var i=0; i