Web Pages Netlify Produce Look Differently To What Local Drive Browsers Display

My URL: https://calgarymultimedia.netlify.app/

I build and test my web site locally before deploying to Netlify. I test using Chrome, Firefox, and Safari on my local drive. I’m using Atom as a text editor.

This may be a rookie mistake on my part and I’m unclear how to solve it. I’ve gone through the support docs and support forum to see if this is a common issue but found nothing.

When I test my web pages locally, all 3 of these browsers produce basically a similar looking web site with only slight differences.

But after doing a manual deploy in Netlify (i.e. dragging and dropping the website’s folder) and then reviewing the produced web site, all of my pages look differently to what I was expecting, except, oddly enough, my contact form. The form looks identical (i.e. perfect) to what my local drive browsers display and is what I was expecting to see.

For example, if you look at my About page, you will see a large gap between the bottom of my white navigation bar and the h1 header text (“What We’re About”). This large gap doesn’t exist on any of my local drive browsers. My footer is ¾ of the way down the page and on top of content, not at the bottom of the page where it’s supposed to be (and as it is displayed when using my local drive browsers). My Information, About, and Solutions pages all suffer these same issues.

Oddly, all of these same issues appear in Chrome, Firefox, and Safari when using Netlify’s server, but not when I test these pages on my local drive.

My home page is totally messed up. I’m using CSS Grid to arrange that specific page. Sections that line up perfectly on my local drive have large offsets when Netlify displays them. And the footer is not at the bottom of that page either.

Attempted to Fix These Issues
I attempted to change these pages so that Netlify displays them as my local drive browsers do. I changed margins, padding, etc.in the CSS files.

But now none of my CSS changes are being displayed either. I put ugly red borders around the h1 text and sections but none of those changes are displayed. Then I changed the background colour of the About page to red to again verify that my changes are not happening, and the background colour remained green. These changes are displayed when using my local drive browsers. I verified that the website folder is the correct one by looking at the time modified column of these CSS files before dragging and dropping the folder.

I’m unclear what I’m doing wrong.

howdy, do you have a screenshot of how it should look?

Here is how my home page is displayed on my local drive using Firefox. These screen shots are ordered starting with screen1 (top of page) to screen5 (bottom of page where footer resides).
I hope this helps. Thanks.

The images in my above post loaded in the opposite order. The image at the bottom of my post is the top of my Home page.

Attached is how my About Page looks using Chrome on my local computer. I omitted a middle screen capture because I wanted to show how my footer is displayed at the bottom of the page.



Hi, @JColdrick. Would you test disabling the asset optimization here under Site Name > Settings > Build & deploy > Asset optimization.

After this is done, redeploy the site. If this does not resolve the issue or if there are other questions, please let us know.

Thanks, Luke. That fixed the issue.

Hi Luke, i found this thread because i am having the same issue described as JColdrick, however i was not able to find the “asset optimization” function to disable it. Could you maybe assist me on that? In my post processing settings there are only: Snippet injection, pretty urls and prerendering

@gracexuerwu The Asset Optimization was removed, see:

So it’s unlikely to be the cause of the issue you’re experiencing.

If you’re working with something that produces static output, (and not something that heavily leans on middleware), you could try running your Build command on your local machine (not your develop command), and then check the output by serving it with npx serve.

If you see the difference there, then it would indicate it’s being introduced by configuration differences between develop/build.

Hi @nathanmartin thanks for checking it out, i did the steps that you mentioned with the build command and npx serve, then i checked the url of the localhost and it showed me this, do you know how i could view the html?

Because currently my problem is that the the css of my localhost looks completely different from the netlify deployed website. And i can’t seem to figure out what is causing the issue

This is localhost:

This is the netlify deployed website

See the usage documentation for serve:

You need to run it in the folder you wish to serve, (in your case probably build), or alternatively specify the folder to be served, so if you were to run it from the root you could use npx serve build/

Based on your screenshots, another possibility is that you’ve accidentally “zoomed in” on one of the sites, so you could check that in your browser too. Often pressing Ctrl + 0 (Windows) or Command + 0 (Mac) would reset it.

Apart from what has already been suggested, we also need to see your site @gracexuerwu. Let us know if you can share the URL.

Hi @hrishikesh, yes sure, the site url is gracewu.dev

Thanks @nathanmartin, and no the site is not zoomed in, that is just how it looked like after the netlify deploy…

@gracexuerwu Did you try resetting the zoom on both sites? Or only gracewu.dev?

I ask because I’m otherwise not seeing any difference between those screenshots, it just appears to be the scale, and zooming out on the gracewu.dev gives me a similar appearance to your localhost screenshot.

As silly as it seems, frequently when people report this issue it does turn out to be either:

  • Browser zoom
    OR
  • Differences in configuration between their build script and their develop script