Fit-to-width

Discussion of features in Mozilla Firefox
johnspac
Posts: 82
Joined: January 14th, 2009, 10:34 am

Re: Fit-to-width

Post by johnspac »

Gingerbread Man wrote:
  1. Click the Select All link below and copy the code to the clipboard.

    Code: Select all

    javascript:(function(){function t(f){a=d.createNodeIterator(d,1,f,false);while(a.nextNode()){}}var d=document;t(function(e){x=e.offsetLeft;l=e.offsetParent;while(l!=null){x+=l.offsetLeft;l=l.offsetParent}var w=d.documentElement.clientWidth-x;var s=e.style;if(s.marginLeft)w-=s.marginLeft;if(s.marginRight)w-=s.marginRight;if(s.paddingLeft)w-=s.paddingLeft;if(s.paddingRight)w-=s.paddingRight;if(s.borderSize)w-=s.borderSize;w-=d.defaultView.innerWidth-d.documentElement.offsetWidth;if(e.tagName=='IMG'){h=e.clientHeight*w/e.clientWidth;s.maxHeight=h}s.maxWidth=w+'px'})})();
  2. Open the Bookmarks menu and choose Show All Bookmarks or Organize Bookmarks, depending on your version of Firefox.
  3. On the left side, expand the All Bookmarks entry, then left-click Bookmarks Toolbar.
  4. On the right-side, click the Organize button and choose New Bookmark.
  5. Give the bookmark whatever name you want, e.g. Fit to Width. Paste the contents of the clipboard in the Location field. Click the Add button to finish.
  6. Left-click the newly created bookmark on the bookmarks toolbar to use it.


THis is an old thread, but I just found what I was looking for and so I must thank GingerBread Man for this button. Kisses!
MS Windows XP Professional 32-bit SP3
clemenzina
Posts: 12
Joined: October 13th, 2010, 10:16 pm

Re: Fit-to-width

Post by clemenzina »

I've just found this too, more kisses from me! :)

One thing - which is a big ask, I'm sure. I don't use Firefox bookmarks (long story) but have put the bookmarks icon (the one with the drop-down arrow incorporated) in the main toolbar, so when I need Fit to Width I click the drop-down, hover Bookmarks Toolbar, and the Fit to Width link is accessible and works. It would be so super if Fit to Width could be a standalone icon in the main toolbar.

Maybe this can already be achieved and I'm just ignorant ;)

In any case, thank you so much GINGERBREAD xxx

I should add that whilst exploring the Customise menu I enabled "Icons andText" and discovered Text Zoom, with and without size selection. So now I have both Fit to Width and Text Zoom, am spoilt!
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: Fit-to-width

Post by smsmith »

Just make it the only bookmark in your bookmarks toolbar folder, then put the bookmarks toolbar items anywhere you want it.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
DanRaisch
Moderator
Posts: 127166
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Fit-to-width

Post by DanRaisch »

Now locking this due to the age of the original posts.
Locked