Different text align behavior for firefox

60 Views Asked by At

Firefox 38, Safari, Chrome

It just a simple as

body{
    padding:0;
    margin:0;
}
<div style="font-size:34pt;">BRIDGES YEAH</div>

Safari and Chrome are ok. But what wrong with a Firefox ? Is it different default value for something or what ?

2

There are 2 best solutions below

3
On BEST ANSWER

It's hard to predict browser behaviours. A closer solution is to use a line-height.

div{
    line-height:1;
}

Fiddle: http://jsfiddle.net/js23fefm/1/

0
On

I recommend using a normalize CSS file. There are a few out there, I use this. It should make the way browsers render things more consistent.