How to get the height of a "br" element using jquery?
I am trying to get the height <br /> on my webpage. I am using this snippet.
br_size = $('br').height(); console.log(br_size); But only Mozilla Firefox , like this code, all other browsers return 0. Is there a short JS code that returns me the correct height?
PS: I use this method because I know that the required size of X is X= other_size - 4*br_size
The line break depends on the height of the line specified in the HTML / BODY tags, if one is not specified, the browser will most likely use its own. However, if you specify a line height of, say, 20px, then the line break should be 20px. You can probably use JavaScript to determine the default line height