Connecting Tech Pros Worldwide Help | Site Map

Detecting Browser Zoom ?

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 26th, 2008, 02:25 PM
Stevo
Guest
 
Posts: n/a
Default Detecting Browser Zoom ?

I'm creating some DIVs that are sized in pixels. The content of the DIV
can be an image, object or embed and will usually be sized as 100% by
100%. So as the size of the DIV changes, the contents auto-scale with it.

I'm finding that if the page is zoomed in our out (IE7, FF3) then the
rest of the page (not under my control) zooms just fine, but my DIVs
remain at their original size. I haven't tried Opera and understand that
it has a better zoom than IE7/FF3.

I'd like to be able to create my DIVs also using percent values, and I
imagine this would probably solve the problem, but the container I
create into isn't necessarily the same as the size of my DIV. For
example, I might create a 500x400 DIV that centers itself within a
900x400 outer container. If I were to use percent values for width and
height, then my DIV would be 900x400 and that wouldn't be good.

So I'm wondering if anyone has any tips on whether there's a
cross-browser zoom detection script around. I'm hoping that there would
be something I can call that gives me a co-efficient zoom value that I
can use to dynamically resize my own DIV.

I've searched the FAQ and in the javascript google group archive and
found nothing useful. I've also googled this and found only some pretty
vague and useless info.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.