6 replies [Last post]
rafa_vigni
Offline
newbie
India
Last seen: 6 years 9 hours ago
India
Timezone: GMT+5.5
Joined: 2008-07-17
Posts: 2
Points: 0

Hi All,

I have a simple HTML textbox control. I need to zoom the control on MouseOver or Click or Dbl Click etc.. events.

If i specify "textbox1.style.zoom: 200%" it is working as expected in IE. But firefox is not recognizing the ZOOM property. How can i zoom the whole textbox control in Firefox.

Do let me know if any thoughts !!!

Cheers,
Vicky

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 28 weeks 6 days ago
London
Joined: 2004-06-06
Posts: 15650
Points: 2788

If you read up on that

If you read up on that property you would find that it's a MS IE proprietary property only, it will not work in FF or many other browsers.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 2 years 39 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

There are only two browsers

There are only two browsers who zoom at all: Opera and IE7. Only IE6 and 7 have a zoom css function. I am trying to think of an instance where you'd want something to zoom, instead of simply making it bigger, a flexible size, or just let the user control the page to their wishes... but I can't.

I'm no expert, but I fake one on teh Internets

rafa_vigni
Offline
newbie
India
Last seen: 6 years 9 hours ago
India
Timezone: GMT+5.5
Joined: 2008-07-17
Posts: 2
Points: 0

Thanks

My requirement is,

Requirement:
Place a textbox control inside a DIV . Allow user to resize the DIV Pane at runtime .While resizing the DIV Pane the textbox control should also get resized.
ie.. DIV and text box should be grouped toghether so that when the user resize the DIV, automatically the text box size should also get increased.

My Approach:
On Mouse Down and Mouse Up Capture the client X,Y co-ordinates and increase the width and height of the DIV as well as textbox control accordingly.

Problem : While resizing the DIV (and the TextBox as a group) the "text value" inside the textbox is not getting enlarged. I want to a solution to increase the Font-Size as well while the user resize the DIV.
(if i use the CSS Zoomm property it is exactly enlarging the whole control group along with its text. But it is not supported by FireFox as HUGO pointed out.)

I think this will give you a clear idea..!!!!

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 2 years 39 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

A better way to let users

A better way to let users enlarge stuff is to size everything in a flexible unit, and then let the user use text-enlarge. This can even work with IE. Users of IE7 may well just use it's own zoom property, as will Opera users.

Check out this page in any browser that resizes text (so, not Opera) and see how everything gets bigger at the same rate except images: http://stommepoes.nl/Homeselling/secondhome/invoeren2.html

Everything, the page itself, the boxes, the form, the text, is sized in em's. I could have done % I guess, but I just don't.

This gives your users absolute control, AND it works even for those without Javascript (now, I ain't got no Javajunk, and yet I may well want to rezise the text!).

As a note, Safari users have been allowed to resize the actual boxes for some time now. It doesn't also scale the text, but it seems to make the Mackies happy : )

*edit, there is a single item that doesn't seem to scale other than the images: the checkboxes and radio buttons. It's possible that I could get that to work as well with em padding or the such... just didn't think of it.

I'm no expert, but I fake one on teh Internets

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 6 weeks 6 days ago
Victoria British Columbia
Timezone: GMT-7
Joined: 2005-12-14
Posts: 3570
Points: 675

Stomme poes wrote:There are

Stomme poes wrote:

There are only two browsers who zoom at all: Opera and IE7.

Not true! Firefox 3 does it now, and in my opinion it does it better than either of the others. Furthermore it remembers the zoom level you set for individual sites, which is very handy indeed.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 2 years 39 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

Really? Thanks for telling

Really? Thanks for telling me... I've been delaying getting FF3 until more users have moved into it.

Better than Opera's? Howso? Opera's pretty good with zoom. Ie7, not so much : )

I'm no expert, but I fake one on teh Internets