Tech Musings
Archive - February 2007

Page Too Wide Fixer

Sometimes you need to run across a page that is wider than your screen. Dare I say that scrolling right-left-right-left... get old really quick.  Why does this happen? There are two main causes:

  • A very long line with no spaces at all in it. The browser, just like people who typeset books, knows to break a long line of text between words (e.g. where there is a space). The poor browser that hits a very long stream of characters soldiers on hoping for a space where the line can be broken. Eventually, it reaches the width of your screen and just keeps on going causing the scrollbars to appear. When it eventually finds a space, a new line can start.
  • A very wide  image (wider than your screen) is used. This is less common than the long string case but the problem is similar. There is no way to break the image in half so the browser pushes the content wider than your screen

    What can you do to make such pages less painful to read? The easiest thing is to create a bookmarklet and just select it when you run into a page that is too wide. A bookmarklet is a canned piece of Javascript that, when selected, will be executed and can adjust the long strings on the page to make them breakable. For those technically interested, it inserts special tags called "wbr" tags which tell the browser "If you need to break this long string, I "Want BReak" here. This does not permanently change anything, just adjusts the page you are looking at so no worries about hurting anything. Where can you get such a wonderful bookmarlet you might ask?


    Well, I found the bookmarklet at http://forums.mozillazine.org/viewtopic.php?p=1665448#1665448

    The author of the post (makaiguy) got it from somewhere else earlier and was passing it along so I'm repeating the favor for eBay users. The essence of what you need to do is install the bookmarklet shown on that page. I can't post it here because it contains Javascript code which, if it was allowed here, could create security issues.If you also have wide image problems, there is a separate bookmarklet for that problem in the same posting. I've tried this and it seems to work fine in Firefox and Internet Explorer.

  • About eBay | Announcements | Security Center | eBay Toolbar | Policies | Government Relations | Site Map | Help
    Copyright © 1995-2008 eBay Inc. All Rights Reserved. Designated trademarks and brands are the property of their respective owners. Use of this Web site constitutes acceptance of the eBay User Agreement and Privacy Policy.
    eBay official time