Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I scale element height and width using CSS?

Tags:

css

Is there a way using CSS to scale elements. For example, if I have an image, how can I say

img.height = image.height * 0.75  // scale down to 0.75

using CSS?

like image 740
dev.e.loper Avatar asked Nov 06 '11 21:11

dev.e.loper


1 Answers

Try this:

div.zoomed { zoom: 0.75; -moz-transform: scale(0.75); }

Should work in: Firefox 3.5, IE 5.5+, Opera, Safari 4, Chrome

Edit: You should also add -webkit-transform: scale(0.75); for Chrome and Safari, although latest versions supports zoom

like image 100
enloz Avatar answered Oct 28 '22 18:10

enloz