White space around css3 scale

how transform works is:

  1. your element gets rendered
  2. your element gets transformed (moved, rotated, scaled)
  3. other elements stay where they got rendered – around the “original element”

so the white space is really just the way the element was rendered in the first place.

You should use width and height in CSS if you want to render the size of elements differently and have the surrounding elements respond to it.

Or you could use something like javascript to resize things.

Leave a Comment