Try to isolate DIV used for font checking from bleeding of page CSS

git-svn-id: https://mathjax.svn.sourceforge.net/svnroot/mathjax/trunk@586 b8fd5906-0fad-46e2-a0d3-10d94ff285d1
This commit is contained in:
Davide Cervone 2010-08-19 11:18:26 +00:00
parent 4913c618c1
commit 7c12db8b93
2 changed files with 9 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -36,6 +36,9 @@
Init: function () {
this.div = MathJax.HTML.addElement(document.body,"div",{
style: {position:"absolute", visibility:"hidden", top:0, left:0, width: "auto",
padding:0, border:0, margin:0,
textAlign:"left", textIndent:0, textTransform:"none",
lineHeight:"normal", letterSpacing:"normal", wordSpacing:"normal",
fontSize:this.testSize[0], fontWeight:"normal", fontStyle:"normal"}
},[""]);
this.text = this.div.firstChild;
@ -293,8 +296,10 @@
// Make hidden div for when math is in a display:none block
this.hiddenDiv = this.Element("div",{
style:{visibility:"hidden", overflow:"hidden", height:"1px", width: "auto",
position:"absolute", top:0}
style:{visibility:"hidden", overflow:"hidden", position:"absolute", top:0,
height:"1px", width: "auto", padding:0, border:0, margin:0,
textAlign:"left", textIndent:0, textTransform:"none",
lineHeight:"normal", letterSpacing:"normal", wordSpacing:"normal"}
});
if (!document.body.firstChild) {document.body.appendChild(this.hiddenDiv)}
else {document.body.insertBefore(this.hiddenDiv,document.body.firstChild)}