The code uses a fluid layout. If the container does not allow for the content elements to be shown horizontally, they will automatically be stacked. There is nothing strange in what we are doing: we are just reading the container's declared width and adjusting the layout accordingly.
Just to clarify with regard to the screenshots above: are you opening the same HTML file, on the same computer, with two different browsers (Chrome vs. Firefox)? Can you confirm that the zoom property is set to 100% in both browsers, and that you are using default font settings (e.g. https://support.google.com/chrome/answer/96810?hl=en)?