Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When using CSS Scale in Firefox, element keeps original position

Tags:

When using scale in Firefox, the scaled element dóes get scaled properly. The problem is, that it's positioned as if it isn't scaled.

This works fine in Chrome, and probably also in IE, Safari and Opera. These browsers all support the CSS zoom property, where Firefox doesn't. For Firefox I'm using -moz-transform: scale(0.3);.

This is my CSS:

#overview .page-content {     zoom: 0.3;     -moz-transform: scale(0.3); } 

This is what it should look like (as in Chrome):

zoom in chrome

This is what it shouldn't look like (as in Firefox): scale in firefox

Does anybody know how to fix this? Or maybe a workaround?

like image 723
Thomas Avatar asked Nov 02 '11 12:11

Thomas


1 Answers

As thirtydot mentioned:

position: absolute; -moz-transform-origin: 0 0; 

This will do the trick.

like image 196
borisrorsvort Avatar answered Sep 20 '22 17:09

borisrorsvort