Hi on my website When you visit it, the logo will kind of move back and forth along with the content. After about a second it will stop. But why is it doing this?

Dani AI

Generated

A quick diagnosis: that brief “jitter” is almost always a layout reflow — the page’s boxes change size or position while the browser is still parsing resources or when JavaScript alters the DOM. Small, one-time shifts are normal during parsing, but a visible movement that lasts a second usually means a resource (image, font) or a script is changing element dimensions after initial paint.

Quick troubleshooting checklist

  • Open DevTools and inspect the logo element to see computed width/height and what CSS rules apply (use the inspector to toggle or delete rules).
  • Temporarily remove or disable JavaScript (or delete the suspect script node from the DOM) to confirm whether a script is causing the change.
  • Check the Network panel for late-loading images or fonts that might resize containers.
  • Look for scripts that replace or resize images after load — those are a common cause.

Practical fixes (apply one or more)

<!-- give the image intrinsic sizing -->
<img src="logo.png" width="220" height="60" alt="Site logo">

/* reserve space so layout doesn't jump */
.header-logo { width: 220px; height: 60px; overflow: hidden; }
.header-logo img { display: block; width: 100%; height: auto; object-fit: contain; }

/* if animating, use transforms to avoid reflow */
.logo { transition: transform 0.25s ease; }
.logo.shift { transform: translateX(10px); }

When asking for help include the exact header HTML, the CSS rules that affect the logo/container, any JS that initializes image plugins, and the browser/version. was right to request source for precise diagnosis; ’s comment about rendering is partly correct (parsing causes small shifts), and ’s follow-up that a third‑party image script was the culprit confirms the typical pattern. For background on reflow and layout shifts see Reflow and Cumulative Layout Shift.

Recommended Answers

All 4 Replies

Well, when i visited your site I saw something telling you to upload your HTML files,

but as for the moving logo, that's probably just part of the HTML rendering process. As it's parsing all HTML it'll move around a little depending on what's being worked with.

Hope I helped :)

Hi on my website When you visit it, the logo will kind of move back and forth along with the content. After about a second it will stop. But why is it doing this?

Before anyone can answer any of what your saying we need some coding from your entire front page so click on view source and paste into here.

Yes, sorry about that, my nameservers have changed :( , I'll upload to my new server tonight ;) I will also post the source.

I have got it back online, it seems the issue is the file! I have had many problems with it so I don't think I'll be using it again unless they can sort it out pretty quickly :|

Thanks for all your help ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.