16

I searched for this and found many solutions (using css3 transition).

Actually i am using {zoom:1.5} for all my buttons. But it is not working on firefox. when I use transition property like:

-moz-transform: scale(1.5); /* Firefox */
-moz-transform-origin: 0 0;

All my buttons are overlapping. See ok and cancel button. enter image description here

Is there any other alternative for this?? any help??

Sumit Raghav
  • 610
  • 2
  • 5
  • 15

5 Answers5

17

To scale 50% and keep top center:

transform: scale(0.5);
transform-origin: 50% 0;

This did work with Safari/Firefox/Chrome (I did not test with IE)

ricardo
  • 1,221
  • 2
  • 21
  • 39
  • 2
    for anyone using it: please keep in mind that this affects the width of the element. Full-width elements will also scale, so if increasing the size, you will get a margin around your element. – GlabbichRulz Mar 15 '20 at 15:01
  • It still takes up the same space. All the margins say 0. How do you fix this? @GlabbichRulz – Philip Rego May 02 '20 at 20:45
  • 1
    unfortunately i did not yet find a proper zoom replacement for firefox – GlabbichRulz May 03 '20 at 10:35
8

You can use:-

-moz-transform: scale(0.8);

in firefox as alternative..

Karim Ali
  • 146
  • 1
  • 7
0

It was a combination of the existing answers that did it for me:

-moz-transform: scale(...);
-moz-transform-origin: 0 0;

With 50% 0 as ricardo's answer suggesst for the latter option there was a left margin.

OJFord
  • 10,522
  • 8
  • 64
  • 98
0

What others have posted isn't feasible because the image will still take the same amount of space. Granted the image size doesn't need to resize programmatically, you can scale the image using Gimp, and remove zoom.

Image | Scale Image

Scale Image

File | Export As...

Philip Rego
  • 552
  • 4
  • 20
  • 35
-2

put transform: scale(0.5); instead of zoom:0.5px, this will work. may be you have to change margins accordingly

Faz Ahmad
  • 57
  • 3