I’m experiencing something strange with my website, and I need your help to figure it out. The issue is that the appearance of my website on the live version doesn’t match what I see on localhost. Specifically, the sizes of the containers are different.
To make it easier for you to understand, please take a look at the following images and compare them:
As you can see, both images have the exact same width and height, were taken in the same browser, and reflect the same commit. Nothing has changed or been added since then. Therefore, the difference in container and button widths is real, and I’m not sure why it’s occurring.
Additionally, I have built it locally, and it seems perfect. I suspect that there may be an issue with the build process when using Netlify. Interestingly, I have encountered a similar problem with Vercel as well.
Any insights or suggestions would be greatly appreciated. Thank you!
I’m unable to test your project locally due to this error:
[FirebaseError: "projectId" not provided in firebase.initializeApp.] {
code: 'invalid-argument',
customData: undefined,
toString: [Function (anonymous)]
}
This makes me think this is not a problem with Netlify (or Vercel for that matter). Maybe OS somehow makes a difference? Netlify uses Ubuntu. Not sure what Vercel uses, but maybe you can try building your app on an Ubuntu machine?
After searching everywhere and making several attempts to activate/deactivate modules, plugins, whatever… I realized what was happening.
It appears that I had a 110% zoom on my localhost.
I came to this realization when I compared the custom width of an image. The intended width was supposed to be 100px, which was correct on Netlify, but incorrect on localhost.
So, at least we’ve learned something new… when you zoom in on a website, it remains that way indefinitely.