Monday 24 January 2005 — This is almost 20 years old. Be careful.
If you find yourself following URLs that have fragment identifiers (you know, the part after the “#” hash mark), and they take you to the right page, but not the right place on the page, then most likely the page you’ve landed on has images without width and height attributes. The browser loads the page, and finds the spot identified by the fragment id, but then the images load in, and move the page around underneath you.
The fix is to make sure all of the images on the page have width and height attributes. That way the page is laid out correctly even before the images are loaded, and the fragments will work properly.
As you may have already guessed, I updated my blog software to add width and height attributes to all my images. Using Python Imaging Library, it was a piece of cake. Links to particular blog entries on this site will now work much better.
Comments
Add a comment: