1

I am facing a problem while scaling a div using CSS. I am using the below CSS to scale a div. But the whole window is getting scaled. 'ScaleOn is the class of that div'

div.scaleOn {
transform: scale(2, 5);
-moz-transform: scale(2, 5);
 -ms-transform: scale(2, 5);
-webkit-transform: scale(2, 5);
 -o-transform: scale(2, 5);
}
JKANNAN
  • 83
  • 1
  • 10
  • 1
    please provide the html markup. As css is case sensitive, and you've used a Capital letter on one part and a lowercase letter in your definition could be your issue here. – jbutler483 Feb 12 '15 at 14:25
  • 1
    @jbutler483 I don't think that is the case...I have been able to reproduce his problem in this [fiddle](http://jsfiddle.net/401zbr1z/2/). Seems like default behavior if you are scaling divs. Try to inspect the scaled element and you will see what I mean. – Michelangelo Feb 12 '15 at 14:29
  • @jbutler483 Class name are same in CSS and Html, by mistake I written in Capital Letter – JKANNAN Feb 12 '15 at 14:36
  • possible duplicate of [White space around css3 scale](http://stackoverflow.com/questions/16385578/white-space-around-css3-scale) – TheGreenkey Feb 12 '15 at 14:37
  • @Mikey You are right, the wrapped element gives that error. Its solved – JKANNAN Feb 12 '15 at 15:42

1 Answers1

-1

I don't know but this topic discusses a similar problem: White space around css3 scale

You must wrap your scaled div inside another div. Hope it helps!

Community
  • 1
  • 1
Michelangelo
  • 5,888
  • 5
  • 31
  • 50