Created
February 1, 2012 17:43
-
-
Save jmendiara/1718278 to your computer and use it in GitHub Desktop.
Annoying extra-pixel in Firefox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> | |
<style type="text/css"> | |
p { | |
line-height:32px; | |
font-size:28px; | |
font-family:Arial, Helvetica, sans-serif; | |
} | |
span.bold { | |
font-weight: bold; | |
} | |
</style> | |
<script> | |
function log(str) { | |
document.getElementById("log").innerHTML += str + "<br/>"; | |
} | |
function assert(divID){ | |
var realHeight = document.getElementById(divID).clientHeight; | |
if (realHeight == 32){ | |
log("OK!! " + divID + " has the correct size"); | |
} | |
else { | |
log("KO!!!!!! " + divID + " has size " + realHeight); | |
} | |
} | |
function check(){ | |
assert("good"); | |
assert("bad"); | |
} | |
</script> | |
<body onload="check()"> | |
<p id="good"> | |
<span>Loren ipsum</span> Loren ipsum | |
</p> | |
<p id="bad"> | |
<span class="bold">Bold</span> Loren ipsum | |
</p> | |
<p id="log"> | |
</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment