Answer the question
In order to leave comments, you need to log in
How do you deal with 1px in line-height (WebKit and Firefox)?
Hello!
Please write in what ways you align the line-height in browsers on the WebKit engine and in Firefox, since there is a difference of 1px. I searched on the Internet, but I did not see a normal answer.
At the moment I use the following construction (crutch):
@-moz-document url-prefix() {#kol_sk{line-height: 0.6;}}
Answer the question
In order to leave comments, you need to log in
Maybe someone will need it, "wrote" a simple script that in the firefox browser reduces the value of all line-height by 1 px :
if ( $.browser.mozilla ) {
$('div').each(function() {
var webkitlh = $(this).css('line-height');
if (webkitlh != 'normal') {
var mozhlroz = Math.floor(parseInt(webkitlh.replace('px','')) - 1)+'px';
$(this).css({'line-height' : mozhlroz});
};
});};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question