‘innerText’ works in IE, but not in Firefox

Update: I wrote a blog post detailing all the differences much better. Firefox uses W3C standard Node::textContent, but its behavior differs “slightly” from that of MSHTML’s proprietary innerText (copied by Opera as well, some time ago, among dozens of other MSHTML features). First of all, textContent whitespace representation is different from innerText one. Second, and … Read more

How do I style a dropdown with only CSS?

Here are three solutions: Solution #1 – appearance: none – with Internet Explorer 10 – 11 workaround (Demo) — To hide the default arrow set appearance: none on the select element, then add your own custom arrow with background-image select { -webkit-appearance: none; -moz-appearance: none; appearance: none; /* Remove default arrow */ background-image: url(…); /* Add custom … Read more

What is JavaScript’s highest integer value that a number can go to without losing precision?

JavaScript has two number types: Number and BigInt. The most frequently-used number type, Number, is a 64-bit floating point IEEE 754 number. The largest exact integral value of this type is Number.MAX_SAFE_INTEGER, which is: 253-1, or +/- 9,007,199,254,740,991, or nine quadrillion seven trillion one hundred ninety-nine billion two hundred fifty-four million seven hundred forty thousand … Read more

What is a clearfix?

If you don’t need to support IE9 or lower, you can use flexbox freely, and don’t need to use floated layouts. It’s worth noting that today, the use of floated elements for layout is getting more and more discouraged with the use of better alternatives. display: inline-block – Better Flexbox – Best (but limited browser … Read more