Welcome to WebmasterWorld Guest from 54.163.100.58

Forum Moderators: open

when Opera is too helpful

   
5:58 pm on Jul 29, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



I've got one of those cute scrolling areas that's made by putting a wide div inside of a regular-sized div and adding a couple lines of javascript. (Exact code isn't relevant to the question; in my case it holds a series of thumbnails with popup full-size pictures.) Yesterday I got an awful scare when it looked as if the arrangement didn't work in Opera: no matter what I said or constrained or exclamation-marked, it flatly refused to keep the inner div on a single line. And, of course, if the overflow drops down to a second line, the user can't see it at all because the whole point is that you don't auto-generate a scrollbar.

Turns out the culprit is a preference setting, "Fit to width" under Zoom Pages. I never use Opera except for code-testing, so I have to assume this setting is on by default. (It explains some weird behavior in other situations, and I can see where it would be useful on some sites, notably the ones that are always hot-linking to my images.) Looks like it takes any horizontal dimension that's wider than the current window and simply ignores it. There's no way you could expect the browser to figure out that this particular value is supposed to be greater than the available width.

So how do other people deal with this? Is there a way to look up the preference setting? Either to override it for this site alone (following the spirit rather than the letter of the pref, so I'm really not going against the user's wishes) or to throw out a one-time message telling users how to make the scroll area behave as intended.

I don't speak php so the answer, if any, would have to come from javascript. If the preference setting can't be read directly, I might be able to figure out something analogous to the routine that checks if you've got a particular font installed, like seeing if a 4000-px div comes out wider than a 3000-px div. But that's definitely in Option C territory.
6:27 pm on Jul 29, 2011 (gmt 0)

WebmasterWorld Senior Member leosghost is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I don't think "fit to width" is default on Opera ..at least not on Linux ..I had to tick a box to use it..

re php browser sniffing ( especially Opera )..go [dauidusdesign.com ] here, he explains it all rather nicely IMO :-)
7:13 pm on Jul 29, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



As Leosghost suggests, "Fit to width" is NOT ON by default in Windows either. However, users can set this to be on all the time in Preferences, but I think that would be a bit risky as it breaks quite a few sites IMO.
8:08 pm on Jul 29, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



Oh, that's reassuring. Wonder how I came to change it? (Answer: probably by misunderstanding what it would do. I've often had to un-set preferences in Graphic Converter after realizing Yeowch! That is definitely not what I wanted!)

I may try Option C anyway just for the fun of seeing if it works (font-testing worked a treat* after I got rid of all the error-handling extranea ;))


* Except on some versions of IceWeasel and Firefox for Linux, due to a non-standard fallback system. But there's a workaround.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month